Added event handling code

* base class Event_handler
* class Event_manager
Corrected some compiler errors
Fixed compiler errors
modified event handling mechanism

* added a simple ball demo for event handling