Riemannian submersions and factorization of Dirac operators