Form-associated custom elements: Implement form-validation

This CL adds the followings to ElementInternals:
 - validationMessage attribute
 - validity attribute
 - willValidate attribute
 - checkValidity() operation
 - reportValidity() operation
 - setValidity() operation

The first five are same as existing IDL attributes/operations of form
control elements though they have additional form-associated custom
elements checks.
setValidity() makes it possible to change validity state of a
form-associated custom element.

This CL also enables :valid :invalid CSS selectors for form-associated
custom elements, and FORM/FIELDSET ancestors take into account of
form-associated custom elements.

* Implementation
 - New attributes/operations of ElementInternals use ListedElement
  methods.
 - As for setValidity(), an ElementInternals keeps a ValidityStateFlags
  instance.
 - ElementInternals overrides callbacks for ValidityState.
 - HTMLFieldSetElmeent and HTMLFormElement: we need to update code so
  that it supports form-associated custom elements as well as
  HTMLFormControlElement.
 - HTMLElement overrides MatchesValidityPseudoClasses() and
  IsValidElement() to support :valid :invalid selectors.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I0c7e27c9c02286c455a4c63348462794ea5d7b39
Reviewed-on: https://chromium-review.googlesource.com/c/1358320
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613843}
14 files changed