Planck 2013 results. XVII. Gravitational lensing by large-scale structure