Worker: Fix broken GC logic on Dedicated Worker while DOMTimer is set

V8GC detemines whether a Dedicated Worker can be collectable by checking
pending activities on WorkerGlobalScope. This activity state is managed by
InProcessWorkerMessagingProxy on the main thread. In some situation, this
logic is broken and this CL fixes it.

<Before this CL>

InProcessWorkerObjectProxy on the worker thread reports pending activities
to the main thread in following cases:

(1) After DedicatedWorkerThread is initialized, reports that there are no
    pending activities regardless of whether they exist.
(2) After MessageEvent is dispatched, checks a pending activity using
    V8GCController and reports a result.

This logic does not work when a DOMTimer is set on initial script evaluation or
on MessageEvent. DOMTimer must be treated as a pending activity[*], but both
(1) and (2) do not take care of it (regarding 2, DOMTimer is not a
ScriptWrappable and V8GCController does not count such an object). As a result,
a worker can be GC'ed even if there is still an active timer.

<After this CL>

After initial script evaluation or MessageEvent, the object proxy starts an
exponential backoff timer to periodically check an activity state and reports
to the messaging proxy when all activities are done.

The messaging proxy reports to the GC that the worker object is collectable
after all posted messages and pending activities are completed.

[*] https://html.spec.whatwg.org/multipage/workers.html#the-worker's-lifetime

BUG=572226, 584851

Review-Url: https://codereview.chromium.org/2124693002
Cr-Commit-Position: refs/heads/master@{#413052}
17 files changed