Initialize WebCore::Frame when swapping frames.

Combine the logic for initializing the WebCore Frame for main frames
and child frames so that the logic can be used to initialize WebCore
state as well when swapping a local frame in.

Also adds a few tests for WebFrame::swap() and fixes a memory leak
issue with WebRemoteFrame, due to WebRemoteFrame::close() being
unimplemented.

BUG=346764

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

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