Theory of Curriculum Learning, with Convex Loss Functions