Algorithms and Theory for Supervised Gradual Domain Adaptation