Switch top-level module worker fetch to use outsideSettings ResourceFetcher

Before this CL, module loading uses the combination of
- a spec-conformant FetchClientSettingsObject (FCSO) (either
  insideSettings or outsideSettings) that is passed explicitly, and
- a single ResourceFetcher (insideSettings-ish thing) that is
  tied with ExecutionContext,
to implement off-the-main-thread top-level fetch.

However, module loading potentially used another insideSettings FCSO
behind the ResourceFetcher in some cases,
which was not spec conformant in off-the-main-thread fetch.

Also, sharing the single ResourceFetcher makes it harder to
distinguish insideSettings and outsideSettings fetches further.

This CL
- Creates a new outsideSettings ResourceFetcher/FetchContext
  which has the outsideSettings FCSO behind it
  for each invocation of off-the-main-thread top-level module worker
  script fetch in WorkerOrWorkletGlobalScope::FetchModuleScript(), and
- Plumbs ResourceFetcher (and FetchContext/FCSO behind that)
  in core/loader/modulescript instead of directly plumbing FCSO.

After this CL,
- FCSO used in module loading is always the outsideSettings FCSO
  behind the outsideSettings ResourceFetcher.
  In most cases this doesn't affect the behavior though, because
  - insideSettings and outsideSettings are so similar
    that the difference isn't caught by the tests, and
  - Where the difference can be observable,
    the explicitly given outsideSettings FCSO is already used
    (e.g. for SecurityOrigin, referrer and referrer policy).
- We have different ResourceFetcher/FetchContext objects for
  insideSettings and outsideSettings fetches.
  Currently their behaviors are the same (except for FCSO),
  but eventually we can further differentiate
  insideSettings and outsideSettings fetches and thus improve
  the spec conformance, by setting different data/behavior to
  each ResourceFetcher/FetchContext.

Bug: 880027
Change-Id: I740ffe3691c7e5213c610f1ab71bd1fc8fd853f6
Reviewed-on: https://chromium-review.googlesource.com/c/1328164
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613783}
38 files changed