blink::DocumentState doesn't use DoublyLinkedList for form_controls_.

Stop using DoublyLinkedList for form_controls_, and stop applying
DoublyLinkedListNode to HTMLFormControlElementWithState. Instead,
DocumentState creates a list of HTMLFormControlElementWithState
on demand, and caches it.

This CL is a preparation to support state restoring for form-associated
custom elements, which are not HTMLFormControlElementWithState.

* DocumentState stores a Document pointer, which is a starting point
  of the traversal.
  - Pass Document& to DocumentState constructor and FormController
    constructor.  Also, remove unnecessary static Create() for them.

* Replace AddControl() and RemoveControl() of DocumentState with
  InvalidateControlList()

* Replace RegisterStatefulFormControl() and
  UnregisterStatefulFormControl() of FormController with
  InvalidateStatefulFormControlList().

Bug: 905922
Change-Id: Ie0ad788042bfca533a2efdff5adc07ce9adf395c
Reviewed-on: https://chromium-review.googlesource.com/c/1411972
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623068}
5 files changed