A Regret Minimization Approach to Iterative Learning Control