Improved hotkey support

This re-implements hotkeys in a more general manner. It is now possible to set hotkeys with modifiers, and the UI for setting them is improved.

Fixes #3779 and the main blockers of #3315 and #2243.

Duplicating the symbol tables from SDL is unfortunate, but I couldn't see a cleaner way of referencing them.