Sub-Riemannian homogeneous spaces in dimensions 3 and 4