Make it easier to debug Service Worker registration and fix a flaky DCHECK.
Make it possible to wait for an extension registration to complete,
and use that in the test.
Add a 10ms delay before returning an ExtensionHost to allow the
ServiceWorkerDispatcherHost's IPC channel to get connected.

Obviously I need to fix this before committing it.