Analytical evaluation of energy gradients in quadratic configuration interaction theory