glwt_events: Fixed uninitialized window on error.
OSX: fix GL context initialization, clean up

Moved context-view association to after the context has been created.

Fixed incorrect behavior in context version attributes caused by a typo
in an #ifdef.
OSX: window close event and glwtQuit fix

Handle windowShouldClose instead of windowWillClose event to get
behavior that is more like other platforms.

Don't terminate the app on glwtQuit.

NSApplocation terminate terminates the entire process, not only the runloop
of the NSApplication object. Using stop instead of terminate only stops the
runloop so we use that instead.

Clean up and refactor window init and cleanup.
OSX: Fix glwtEventHandle(wait=0)

Make glwtEventHandle behave nicely when nextEventMatchingMask returns
nil.

Remove application.[mh] and move keyboard event workaround to
glwtEventHandle instead of subclassing NSApplication. Move
modifier_flags to struct glwt_window_osx.
iOS: Add iOS configuration to CMake files
iOS: Add skeleton iOS implementation
iOS: Add Xcode project for iOS builds
Add glwtRun() and glwtMain().

This is for supporting the program flow on the iOS, where the program
is forced to go through a managed runloop even for initialization.
iOS: Progress.
iOS: Update api
iOS: Make trivial case work
iOS: Implement glwtWindowGetSize
iOS: Implement glwtWindowShow

It is debatable if hiding window is at all useful on iOS.
iOS: Cleanup
iOS: Use UINavigationController as the root view controller

This is optional, but allows for easy transitions for other native views.