Factorization of Dirac operators in unbounded KK-theory