Updated with suggested changes and a bunch of fixes (also to some existing leaks). Apparently, some events are still dispatched on different contexts, while others are not. Async XHRs are thread blocked, even with different DocumentObjs on same thread, but e.g. `readystatechange` events are not. Message events also seem to be thread blocked, which makes a bit of sense since they can be posted by arbitrary windows in different contexts, as well as timeouts. The test for msg events being thread blocked is the `sync_xhr(pre-send)` msg.
Tasks that dispatch events are now pushed separately from other tasks and implicitly store ref to the inner window (needed by task processing to know if the window is "blocked").
Also, when doing a sync XHR send() now, it increases blocking depth for that window, so that event tasks for it are not going to be processed, until its depth is 0. Similar for the thread block depth, for the thread blocked events and timeouts.