Clicking a non-focusable element in an inactive frame should clear focus in the frame.

Clicking a non-focusable element in an inactive frame did not remove focus
from the focused element in the frame because
 - FocusController::setFocusedElement incorrectly returned earlier if there
    was no focused element in the currently focused frame, and
 - FocusController::setFocusedElement cleared focus in the currently
    focused frame if new focused element is 0, but did not clear the focus in
    the new focused frame.

We shouldn't do early-return for a element==0 case. Also, we need to to
call clearSelectionIfNeeded() later than same-element check to avoid test
breakage.


BUG=304145
TEST=automated.

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

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