rP24645 broke meta-key releases. This fixes that.
While investigating, I also discovered a bug already present in A23: if you press Ctrl, then D, then your 'Ctrl' hotkeys remain active. This does not happen if you go "D then Ctrl".
It's buggy and problematic as it might lead to hotkey conflicts.
Unfortunately fixing that isn't trivial. This is my best shot, I haven't noticed anything odd.
This introduces tests for some basic level of sanity checks.