Improve keyboard input on Linux/X11

This PR adds support for layout-independent keyboard input through the XKB extension. Key events are now reported based on the physical key position, in alignment with the Windows and Mac implementations. Text input is still reported using ]logical layout-dependent keys.

On X11 we are still missing:
1. a way to detect layout changes and update the keycode lookup table accordingly.
2. support for multiple keyboards.

Both are doable with a little bit of work, the only roadblock is how annoying X11 is to work with.