FrameLoader should be detached when a Page is going to be destroyed

Currently Page::willBeDestroyed calls LocalFrame::willDetachFrameHost and LocalFrame::detachFromFrameHost to detach the frames in the page, but it does not call FrameLoader::frameDetached. Consequently, FrameLoader doesn't get detached when a Page is destroyed, and FrameLoader::m_client becomes a stale pointer.

To avoid the situation, Page::willBeDestroyed should call FrameLoader::frameDetached. (Then we don't need to call LocalFrame::willDetachFrameHost and LocalFrame::detachFromFrameHost because they are called in FrameLoader::frameDetached.)

HTMLFrameOwnerElement::disconnectContentFrame is already doing this. It calls FrameLoader::frameDetached instead of LocalFrame::willDetachFrameHost and LocalFrame::detachFromFrameHost.

BUG=340522
TEST=None. This issue appears only in Oilpan builds because Oilpan changes the order in which things are destructed.

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

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