Measurement of prompt ψ(2S) production cross sections in proton–lead and proton–proton collisions at √sNN = 5.02 TeV