An EventRegistry is a collection of Events. Each Event has a name
and a list of functions, each known as a handler.
Events can be modified or triggered. When triggered, each function
is called in turn, and the final return value is returned to the triggering context.