Use setTimeout to delay a function to the next tick.

Promise.resolve runs immediately and rejects the `dispatched` promise
before we get a chance to resolve it first.