Redesign event model

Old event model involved keeping a list of all bound events for each
module, requiring iteration over everything when an event is triggered.

New model keeps a list of modules for each event, allowing direct access
when triggering, no iteration needed.