Bug 854048 - Fix batch move/deletion for IMAP messages

This has r+ from @asutherland over at https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/173

https://bugzilla.mozilla.org/show_bug.cgi?id=854048