This complex machinery made sense for Blink, which has hundreds of
developers. In our case, we're just moving around two bools. We can do
that in a much simpler way.
Now the control flow for wiring up platform services starts in the
platform-specific code. Previously we started in shared code, which was
imposing constraints on the startup sequence for all platforms. Now that we
start in platform-specific code, we'll be able to add better support for Mojo
in a future patch.
Currently we run some tasks on the UI thread that shouldn't block the frame,
such as decoding images. This patch introduces a background thread on which we
can run these tasks.