Iterative regularization for learning with convex loss functions