Refactoring: Extract DOMWindow::clearDocument()

There was only one caller of DOMWindow::setDocument(0),
which is the DOMWindow destructor.

This code decouples the null case into clearDocument()
and enforce non-null for setDocument().

R=tkent, hayato
BUG=none

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

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