Service Worker: Add metrics and timeout for starting a Service Worker.
There are some reports of SW getting wedged in the "STARTING" state.
This CL adds metrics to understand the issue and a timeout for
aborting start so that retrying might succeed.
The timeout is 5 minutes (same as the limit for events proposed in
crbug.com/372436). We already have a timeout for 30 seconds of script
evaluation, so this new timeout covers possible failures like getting
stuck trying to allocate a process or waiting for an ack from the
renderer.
5 minutes may be too harsh for users on slow connections, so future
work on some sort of exponential backoff or varying the limit for new
vs installed workers may be possible. An existing issue is the 30
second timeout for script evaluation includes importScripts(),
which could potentially take a long time downloading scripts.
BUG=448003
Review URL: https://codereview.chromium.org/
962543005
Cr-Commit-Position: refs/heads/master@{#319262}