NOT UP FOR REVIEW YET: Work thread stuff

Builds on https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/159