Collinear factorization and splitting functions for next-to-next-to-leading order QCD calculations