Visibility Representations of Toroidal and Klein-bottle Graphs