The war’s return to the public consciousness poses new challenges and opportunities for the candidates, particularly Senator John McCain.