Planck 2013 results. XIII. Galactic CO emission