Temporal Decomposition for Multi-Interval Optimization in Power Systems