Equilibrium configurations of nematic liquid crystals on a torus