Modal events changes

Add support for special links in modal content to trigger modal events.
If event listener is a promise then add its result to arguments that are passed to consecutive listeners.