Evolution of entanglement entropy following a quantum quench: Analytic results for the XY chain in a transverse magnetic field