Planck 2015 results. XXVI. The Second Planck Catalogue of Compact Sources