Factor out Runtime to root/Runtime.js

front_end/Runtime.js was doing multiple things: it was instantiating
side-effecty descriptors and initializing applications, as well as
storing all state for the modules/extensions, etc...

To support proper ES Modules, we need to separate these. root/Runtime.js
contains simple classes that store the data and can be retrieved, as well
as some helper functions that will load the respective data.

The RuntimeInstantiator.js code includes the start functions used in the
entrypoints themselves. They will use an instance of the Runtime to
properly load the application.

Along the way, I also fixed various TypeScript errors, mostly around
incorrect or missing type definitions.

[email protected],[email protected]

Bug: 1011811
Change-Id: If3ddea9267813691b3faeb6ea4b0cf64edbde1f4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2107523
Commit-Queue: Tim van der Lippe <[email protected]>
Reviewed-by: Jack Franklin <[email protected]>
diff --git a/front_end/wasmparser_worker_entrypoint.js b/front_end/wasmparser_worker_entrypoint.js
index 981bdb6..ff7219f 100644
--- a/front_end/wasmparser_worker_entrypoint.js
+++ b/front_end/wasmparser_worker_entrypoint.js
@@ -2,9 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-import './Runtime.js';
-
+import './RuntimeInstantiator.js';
 import './platform/platform.js';
 import './wasmparser_worker/wasmparser_worker.js';
 
-Root.Runtime.startWorker('wasmparser_worker_entrypoint');
+import {startWorker} from './RuntimeInstantiator.js';
+
+startWorker('wasmparser_worker_entrypoint');