GALACTICNUCLEUS: A high angular resolution JHK s imaging survey of the Galactic centre I. Methodology, performance, and near-infrared extinction towards the Galactic centre