Added utility event manager template class.
Refactored the EventManager with the new template utility.
Updated event architecture.

Also updated UI system's event handling and added UIEventAdapter that converts events from an InputSource to EventManager-style events.