Introduce promise_test().

promise_test() is similar in character to async_test() but intends to
reduce the boilerplate of writing tests for code that return promises.

promise_test() requires a function object as the first parameter. This
function, when called with a test object as its only parameter is
expected to return a thenable.

When the returned thenable fulfills, the test is considered done. If the
thenable rejects, the test fails in a manner similar to having been
terminated with an unhandled exception.
Support synthesizing tests from test results.

Introduce synthesize_tests(). This method when called with an array of
test results and a harness status, creates a set of synthesized tests
that mirror the results.

A service worker or a web worker can run full fidelity tests and then
pass the results over to a client document. This client document can
then call synthesize_tests() to replicate the test run from the worker.
Any reporting infrastructure that's already in place can then handle the
worker's test results in the same manner as handling tests run from the
client document.
Clean-up extra whitespace.