Constraining the electric charges of some astronomical bodies in Reissner–Nordström spacetimes and generic r−2-type power-law potentials from orbital motions