Communication: Analytic gradients in the random-phase approximation