Global deformations of Riemannian metrics: applications to relativistic cosmology