add coverage
fix tests that break under coverage instrumentation

By switching to test async code properly so instrumented code that
doesn't run fast enough doesn't incorrectly fail.

When running all the tests at once, a couple tests seem to fail
semi-regularly but unpredictably, mostly on the second and later runs.
This is the case for more tests in Chrome.