Adding an event emitter to publish messages about internal state of the
consumer and tasks.
Adding event emitter tests
Adding support for events to user-facing apis.