Mind the Duality Gap: Logarithmic regret algorithms for online optimization