Fixed bug in Input.cpp.

Instead of clearing the buffers every frame, we should only clear it in
the allocate() function.
Added selected index to UIList.
Added events to UIObject.

Implemented a way to use the Event.h inside UIObject.cpp. We can now
fire events from our ui objects. This is really good if we want some
other part of the code to listen for things like presses and hovers.