Maximal superintegrability of the generalized Kepler–Coulomb system on N-dimensional curved spaces