What was the impact of the Union victory at Gettysburg on the war’s duration?