A unified convergence bound for conjugate gradient and accelerated gradient