Planck 2013 results. XVIII. The gravitational lensing-infrared background correlation