DOM: Add some UseCounters to investigate possibility to change legacy DOM mutation event timing

We'd like to make DOMNodeRemoved and DOMNodeRemovedFromDocument events
asynchronous. This CL adds some UseCounters to investigate its impact.

* kDOMNodeRemoved*EventDelayed:
  We already dispatch the events asynchronously in some cases.
  This counts them.

* kDOMNodeRemoved*EventHandlerAccessDetachingNode:
  Count cases where
 - Accessing parentNode of to-be-removed Node
 - getElementById() for to-be-removed Node or its descendants
 - NodeList/HTMLCollection/querySelector*() for to-be-removed Node
  or its descendants in DONNodeRemoved* event handler.
  If we change the timing, we'll have incompatibility in such cases.

  This doesn't have a perfect coverage. For example, sibling access
  from a sibling of to-be-removed node is not counted.

* kDOMNodeRemoved*EventListenedAtNonTarget:
  Count if the events are listened at non-target nodes.
  If we change the timing, bubbling/capturing won't work well.

This CL has no behavior changes except UseCounters.
If benchmarks regress a little, we won't revert this CL soon, and
will revert after a branch point. If benchmarks regress very much,
we'll revert this CL.

Test infrastructure:
* Add internals.clearUseCounter() so that we can test a UseCounter
  multiple times in a single test.

Bug: 859391
Change-Id: Iefaa324217a3e914c7f095165aba513b847b328f
Reviewed-on: https://chromium-review.googlesource.com/1134640
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574877}
23 files changed