Improved shutdown sequence.

Also removed an error message when calling an unitialized GLFW library.
Added option to setup an optional frame limiter.