A Lyapunov Analysis of Accelerated Methods in Optimization