runat-1128988: Implement Task.spawn for the web
runat-1128988: Implement Task.spawn for the web

This code doesn't reach mozilla-central. No need for detailed review.
It's essentially a *much* shorter version of Task.spawn() from
https://dxr.mozilla.org/mozilla-central/source/toolkit/modules/Task.jsm

Signed-off-by: Joe Walker <7a17872fbb32c7d760c9a16ee3076daead11efcf@mozilla.com>

joewalker/gcli,mozilla/gcli,joewalker/gcli,mozilla/gcli,mozilla/gcli