Assume main thread

Per our [discussion](https://github.com/MailCore/mailcore2/commit/905b2415dae343af598d6f038e267d7f3af806f8#commitcomment-4424592).  I also took the opportunity to convert the file from tabs to spaces, and add some documentation.