Asymptotic Theory of Iterated Empirical Risk Minimization, with Applications to Active Learning