Planck 2013 results. VIII. HFI photometric calibration and mapmaking