Add an OpenGL extension loader to remove dependency on GLEW.

Add an OpenGL extension loader to remove dependency on GLEW. 
Also fix a few compiler warnings etc...
Works well on Linux, should be cross platform, but may want to test on other platforms first.