Make KeySender an interface.

Introduce a level of indirection between the desire to send keyboard events and actually sending
them. This makes it easier for us to experiment with different key generation strategies.
Introduce an abstraction for sending motion events.

Not sure that this is perfect, but this is similar to the KeySender and used for the same
reason.
Code clean up. No logical changes.