Relativistic many-body perturbation theory using analytic basis functions