Abigail Spanberger, a former congresswoman and C.I.A. agent, will be the first woman to serve as governor of Virginia, following a streak of 74 men.