Fix memory leak in handledKeydownEvents for repeated keydown events

`handledKeydownEvents` leaks when a keydown event 'repeats' (ie. the user holds the key), since we only remove one of the keydowns corresponding to the current keyup event. This PR instead uses a `filter` call, which removes all the keydown events that relate to the keyup and prevents the leak.
I find this logic difficult to follow.  It's not obvious that it's equivalent to the original, and it's not obvious how many times `DomUtils.suppressPropagation(event)` will be called.

Any chance you could refactor it to make the logic clearer?