Bug 940408 - Rework DeferredTask to allow asynchronous tasks and support AsyncShutdown. r=Mossop