Danville officer kills man during foot chase