Implemented an Event class that automatically registers and unregisters with modules

This essentially just fixes issue #1 as you simply have to override this class from
your class that register some sort of event. This however does assume you're properly
cleaning up the links with libevent from the deconstructor. Also DO NOT delete any
event driven objects yourself!

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>