Implementation of analytical energy gradients at third- and fourth-order Møller-Plesset perturbation theory