Ignore document.write() calls from scripts executed from HTML imports

This approach leverages the existing code for ignoring document.write() calls
from async scripts. The code is itself modeled directly on language from the
HTML spec, see http://www.whatwg.org/specs/web-apps/current-work/#ignore-destructive-writes-counter

R=morrita@chromium.org
BUG=327152

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

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