Hamiltonian Systems Admitting a Runge–Lenz Vector and an Optimal Extension of Bertrand’s Theorem to Curved Manifolds