[compositorworker] Avoid deadlock issue caused by importScript

importScripts is a sync API that runs on main thread. Using it on CW
will block the compositor thread on main which can lead to deallock in
the current Blink compositing architecture. So we should avoid it for
now.

TODO:
 - Find a way to throw if importScripts is used in CW. Current failure is
   subtle
 - Provide and alternative to synchronous importScripts. Note that async
   resource loading in already possible in workers thanks to fetch so we
   may be a able to leverage that.

BUG=624651
TEST=virtual/threaded/fast/compositorworker

Review-Url: https://codereview.chromium.org/2119383002
Cr-Commit-Position: refs/heads/master@{#403819}
6 files changed