map getUndispatchedEvents and setEventToDispatched to eventstore; make using of eventDispatcher configurable