Algorithms and Theory for Multiple-Source Adaptation