A gunman killed a Virginia Tech police officer Thursday at a campus parking lot and then apparently shot himself to death nearby in a baffling attack that shook up the school nearly five years after it was the scene of the deadliest shooting rampage in modern U.S. history.