Add the possibility to await a message dispatch

This should wait for all effects that may be spawned by the message.