The Cotton tensor in Riemannian spacetimes