Support testing in a worker.

This change:
* Allows testharness.js to be imported into a worker. Currently
  dedicated workers, shared workers and service workers are supported.
* Allows test results from a worker to be imported to a client document.
* Introduces promise_test() that handles some boilerplate for testing
  with Promises.

Within a worker, the test harness can be imported via:

  importScripts('/resources/testharness.js');

Once imported, the worker can invoke tests using test(), async_test(),
etc. The testharness sends tests results from the worker to any
connected client document that called fetch_tests_from_worker(). See
apisample14.html, apisample15.html and apisample16.html.