Element::focus() should acquire the reference of LocalFrame.

FrameSelection::setSelection() may cause some DOM events to happen synchro-
nously, which could free the frame and produce a dangling pointer to the frame.

This patch extends the lifetime of the frame object and fixes this use-after-
free.

BUG=357669

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

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