Statistics for Planck 2018 results: I. Overview and the cosmological legacy of Planck