Invalidate :default pseudo classes when a default button is added or removed.

"default button" is the first submit button in tree order [1].  We need to
invalidate :default pseudo class when:
 - Form control type is changed
 - A submit button is associated to a form.
 - A submit btuton is disassociated to a form.
for
 - The submit button, and
 - Other submit buttons associated to the form.

Implementation:
 * HTMLButtonElement.cpp
   Invalidate submit buttons associated to the form owner when |type| attribute
   is udpated.
 * HTMLInputElement.cpp
   Invalidate submit buttons associated to the form owner when |type| attribute
   is udpated and the previous type or the current type is a submit button.

 * HTMLFormControlElement.cpp
   When the form owner is changed, invalidate submit buttons associated to the
   old form owner and the new form owner.

 * HTMLFormElement.{cpp,h}
   - Introduce HTMLFormElmement::invalidateDefaultButtonStyle.
   - Introduce m_hasElementsAssociatedByFormAttribute
    Refer to it during collecting associated elements instead of
    IdTargetObserverRegistry::hasObservers.
    IdTargetObserverRegistry::hasObservers didn't work well in
    HTMLFormControlElement::didChangeForm because an observer is registered
    after didChangeForm.

[1] https://html.spec.whatwg.org/multipage/forms.html#default-button

BUG=557683
TEST=automated

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

Cr-Commit-Position: refs/heads/master@{#379190}
7 files changed