Use one EventSender instance per Document, rather than several static local instances shared among event types.
Add a new API that dispatches all pending events with a specific type.
Record and replay sending of pending events.

* Store an InputIterator pointer on Document, and replace uses of ReplayUtilities with accesses to the Document's InputIterator.
* EventSender stores a reference to its Document, and dispatches differently during capture and replay.
* Remove uses of Node::dispatchAsyncEvent that now are deterministic because EventSender is deterministic.