Worker: Separate classic script evaluation from worker thread initialization

Before this CL, classic script evaluation is tied with worker thread
initialization. This is cumbersome for module scripts because module scripts are
fetched after a global scope is created and not ready during the initialization.
As a quickfix, it's bypassed for WorkletGlobalScope that is only the client of
module scripts on the worker thread for now (See the end of
WorkerThread::InitializeOnWorkerThread()).

For cleanup, this CL separates classic script evaluation from worker thread
initialization. If you want to evaluate classic scripts, you need to explictly
post a task after the worker thread initialization. This makes it easier to
switch classic script loading and module script loading in following CLs: if
you want to evaluate module scripts, you can just post a task for module script
evaluation.

Rough design doc of module scripts for Dedicated Worker:
https://docs.google.com/a/chromium.org/document/d/1IMGWAK7Wq37mLehwkbysNRBBnhQBo3z2MbYyMkViEnY/edit?usp=sharing

Bug: 680046
Change-Id: I7bf32051a8e423de65bb6b0d76164cb1540d3aa4
Reviewed-on: https://chromium-review.googlesource.com/822320
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524646}
18 files changed