The Cotton Tensor In Riemannian Optimization