Added error checking for init and window creation.
Fixed window size being used as framebuffer size.
Added missing standard library headers.
Made OpenGL header inclusion portable.
Merge pull request #2 from elmindreda/master

Various fixes for use of GLFW