Planck 2015 results: XIX. Constraints on primordial magnetic fields