Added support for dispatching key and motion events, stores the events
in a buffer which is then used in World.java to dispatch them.
Initial commit for event dispatching, still needs some work.