libgui: Fix a couple of minor bugs, extract GLTest

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

Change-Id: I7d9570a0d3dbc9c5d7f9b13f2017607af42744b3
diff --git a/libs/gui/tests/Android.mk b/libs/gui/tests/Android.mk
index 045c7b5..50c99ee 100644
--- a/libs/gui/tests/Android.mk
+++ b/libs/gui/tests/Android.mk
@@ -9,6 +9,7 @@
 LOCAL_SRC_FILES := \
     BufferQueue_test.cpp \
     CpuConsumer_test.cpp \
+    GLTest.cpp \
     IGraphicBufferProducer_test.cpp \
     SurfaceTextureClient_test.cpp \
     SurfaceTexture_test.cpp \