Gen_event with an additional capability to pass all handler states to handlers.