Covariant generalization of cosmological perturbation theory