Metric foliations and curvature