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.