Clear DOMWindowEventQueue in Document::detach()

This is a speculative fix for bug 313227.
Apparently DOMWindowEventQueue potentially survives after the lifetime of
companion Document. This change ensures that the queue is closed and cleared
when the companion Document is gone.

Note that this kind of lifetime misalignment should be fixed once
DOMWindow becomes an ExecutionContext subclass.

BUG=313227
R=abarth,haraken

Review URL: https://codereview.chromium.org/58883003

git-svn-id: svn://svn.chromium.org/blink/trunk@161434 bbb929c8-8fbe-4397-9dbb-9b2b20218538