Dialog events and sync/async support in event_route

Two commits will be merged:
* introduced a new dialog event when the dialog states are changed
* events can now be handled asynchronously