[worklets] Make WorkerThread handle both Worker and Worklet global scopes.
This is to allow the WorkerThread infrastructure be used for ThreadedWorkletGlobalScope (see WIP here: https://codereview.chromium.org/2171973002/)
This class could also be renamed to something like ThreadScriptEnvironment or ThreadContextEnvironment, but can also be done later in just a rename patch.
BUG=567358
Review-Url: https://codereview.chromium.org/2116113002
Cr-Commit-Position: refs/heads/master@{#407911}
27 files changed