service worker: Add a way to notify a service worker schedules idle tasks

We are going to add a mode to generate eager code cache in a idle task.
To avoid a service worker from being asked to terminate until the idle task
is finished, we need a way to let ServiceWorkerContextClient know there is
a task to be executed. This CL adds code to plumb such information.

This CL doesn't have behavioral changes. Follow-up CL implements an actual
idle task.

Bug: 915081
Change-Id: I93e89887f08c126746ba2ef0dcace115466ab66c
Reviewed-on: https://chromium-review.googlesource.com/c/1381358
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618147}
8 files changed