On Ensembling vs Merging: Least Squares and Random Forests under Covariate Shift