Group-theoretical quantization of 2+1 gravity in the metric-torus sector