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.
Win32: basic initialization

Initialization of Win32 with WGL and EGL.

Move variable declarations to beginning of block. Use alloca instead of
dynamically sized arrays. Compiles with MSVC.
Win32 event handling
Win32: special keys and mouse wheel

Handle WM_SYSKEYUP, WM_SYSKEYDOWN, translate keysyms to distinguish
between left and right ctrl, alt, etc.

WM_MOUSEWHEEL, WM_MOUSEHWHEEL send button events.
EGL, WGL, GLX: fixes

Fix glwtMakeCurrent(NULL).

Add error status return values to glwtMakeCurrent, glwtSwapBuffers,
glwtSwapInterval and glwtWindowGetSize.

Get rid of platform specific #ifdefs in EGL code. Move
visual_id/pixel_format from x11, win32 to glx, wgl, egl.

Split glwtWindowCreateEGL context and surface creation.
X11, Win32: use switch-case for keymap

Using a look-up table was not such a good idea after all.
GLX, WGL: OpenGL ES contexts

Pass OpenGL ES context flags when creating contexts with GLX and WGL.

Link tests with GLXW and clear the screen with OpenGL.
Fixed rpi compilation with egl changes

rpi/window.c passed the native dispmanx window
by value instead of pointer but according to
eglplatform.h EGLNativeWindowType is void*.
Moved type enum out of GLWTWindowEvent

this helps keeping syntax consistent between C and
C++ otherwise all uses of the enum constants
have to be preposed by GLWTWindowEvent::
Update GLXW submodule
OSX: attempt to load UI (menubar) from a nib file

If the app is in a bundle, attempt to load the Main nib file specified in
the bundle's Info.plist. If the file can't be loaded, the stub menubar which
only shows the app name is used.
OSX: Fixed object management at window destruction

Keep around pointers to the window delegate and view and release separately
when the window is destroyed. The reason for that is that NSWindow close
does not destroy manually set delegates nor views (the objects might still
be needed elsewhere).
OSX: expose works more like on X11 now

Moved calling of the expose callback to NSView drawRect to match X11.