Harden Document::implicitClose against script destroying the page

implicitClose() was saving both a Frame* and the RenderView* on the stack and
then running lots of script and since the recalcStyle and the layout both can
run script and plugins which could detach() the Document and destroy the page
we could end up doing a layout with a free'd RenderView or passing it into the
accessibility APIs.

This patch switches to calling frame() and renderView() at each usage to ensure
no free'd RenderView or Frame is ever used.

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

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