Virginia's governorship will stay in Democratic hands after Terry McAuliffe leaves office in January.