ServiceWorker: Separate entry points of {new,installed} {classic,module} script fetch

For code simplification, this CL separates entry points of off-the-main-thread
{new,installed} {classic,module} script fetch on
ServiceWorkerGlobalScope as follows:

- new classic script:       FetchAndRunClassicScript()
- new module script:        FetchAndRunModuleScript()
- installed classic script: RunInstalledClassicScript()
- installed module script:  RunInstalledModuleScript()

In addition, this CL...

- routes RunInstalled{Classic,Module}Script() calls from the main thread via
  ServiceWorkerThread (not WorkerThread) for better class layering.
- adds a function ServiceWorkerGlobalScope::RunClassicScript() that implements
  the "Run Service Worker" algorithm defined in the service worker spec. This
  enables both FetchAndRunClassicScript() and RunInstalledClassicScript() to
  share the initialization and script evaluation code.
- adds more spec texts.

Bug: 938219
Change-Id: I3ac9c951d5f410c646efaf91b6e4cdb632a65f9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1516126
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#640196}
6 files changed