Fix a couple of minor bugs in existing tests, and extract the GLTest class into its own files. Change-Id: I7d9570a0d3dbc9c5d7f9b13f2017607af42744b3