Move key handling to the frontend

This PR begins work on #1274.
* Key handling has been moved to a content script (`content_scripts/key_handling.coffee`).
* Key handling is now done synchronously as part of the event's key handler.
* Checks on whether we handle a key are all done using the same code. This ensures consistency (eg. now we don't pass `0` to the underlying page if we've handled it ourselves as part of a number prefix).

~~TODO~~ Edit: DONE (improvements):
* [x] Switch from storing the current `keyQueue` as a string of concatenated keys to an array of those keys.
* [x] Rewrite `checkKeyQueue` to support mappings of arbitrary lengths (similar to #1272).
* [x] Remove `splitKeyIntoFirstAndSecond`, `validFirstKeys`, `populateValidFirstKeys`, `namedKeyRegex`.
* [x] Fix tests.

Apart from bugfixes coming from unifying the frontend and backend key handling, this should function the same as before.