Automatically detect Xkb at run-time.

Uses XGetKeyboardMapping as a fallback.  Fixes #282.
Cleanup of XKB detection code.
Cleaned up shared key repeat detection.
Fixed broken key repeat detection.
Fixed glfwShowWindow restoring maximized windows.

Fixes #264.
Merge remote-tracking branch 'upstream/master'