Rewriting Systems and Geometric 3-Manifolds