Planck 2015 results. XXI. The integrated Sachs-Wolfe effect