Should focus on the first element with autofocus attribute, not the last.

Move hasAutofocused flag from HTMLFormControlElement to Document because of the
step 7 of [1].
> 7. If the user agent has already reached the last step of this list of steps in
> response to an element being inserted into a Document whose top-level browsing
> context's active document is the same as target's top-level browsing context's
> active document, abort these steps.

The new behavior matches to the standard, Firefox, and IE11.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autofocusing-a-form-control:-the-autofocus-attribute

BUG=336346
TEST=automated

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

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