Optimization, Learning, and Games with Predictable Sequences