Toroidal plasma rotation in axisymmetric and slightly nonaxisymmetric systems