Bug 1093467 - Servers that don't support UIDNEXT
Bug 1100694 - [email/IMAP] Handle missing timezone for INTERNALDATE date-time, as generated by netc.fr / net-c.com
Bug 1101982 - If IMAP and SMTP fail, use IMAP's error.

Without this patch if SMTP rejects first, we'll use SMTP's error code
even though we meant to use incoming's.  This is consistent with us
reporting the incoming server as the one having the problem.
Bug 1101982 - Return 'bad-user-or-pass' for SMTP gmail app-specific pw failure

We removed specific error support for gmail's account-specific password
error since we always want to be using OAuth2 anyways.  However, we should
return something better than 'unknown' as a result.  (And in retrospect
maybe we shouldn't have removed our existing error handling.)
Bug 1097421 - Take more upstream browserbox changes

This also includes some of our fixes having been accepted upstream.

We have some more changes going upstream, so we want to take these too to
keep in sync.

The most notable change here is that browserbox no longer issues a wasted
CAPABILITY if we're going to issue STARTTLS anyways.  Accordingly there have
been test updates for that.
Bug 1089132 - Fix x-unknown charset explosion in mimefuncs

Upstreaming as https://github.com/whiteout-io/mimefuncs/pull/8
Bug 1089132 - Do not quote dates in SEARCH

Yandex does not like its dates wrapped in double-quotes.  Either way is
legal.

Upstreaming as https://github.com/whiteout-io/browserbox/pull/42
Bug 1096025 - Make sent messages marked as read.

For IMAP we had a regression when we moved to email.js.  The imap.js impl we
were previously using would prepend the backslash for us.  browserbox does not,
which makes more sense, but we forgot to update our code.  This is now
corrected and checks have been added to test_compose to verify this.  (The
tests fail without the change.)

It also turned out that our POP3 implementation was not setting the messages as
read, so I've done that.

We also had the same problem for ActiveSync, but that was due to the server not
marking the message as read when saving to the sent folder.  (AKA it wouldn't
have been a problem in the real world).  I've updated this in mail-fakeservers
in the 0.0.33 release.
Bug 1096058 - Implement createFolder for email.js and add tests

When we moved to email.js, createFolder was completely broken.
I've done the following:

- Implemented a createMailbox function in browserbox:
  https://github.com/whiteout-io/browserbox/pull/43

- Cleaned up our createFolder job.  This is reasonably straightforward.  The
  big change is we no longer perform a "LIST" after the fact to see what name
  transforms might have happened.  I added a comment explaining this change.
  It's probably important to note that the original choice of doing that I
  think was primarily a cop-out on my part from trying to understand the folder
  naming rules and having had the goal of createFolder being a comprehensive
  feature we'd surface to users.

- Fixed a testing infrastructure oversight.  expect_runOp had explicit support
  to expect a specific error result for runOp_end.  Unfortunately due to an
  asymmetry with other log types (ex: event) and the "error" argument having
  a value of false, we were not actually checking the value!  For the purposes
  of minimalism, I updated the log definitions rather than log.js.  This
  required minimal changes to test_disaster_recovery.js and to js/jobmixins.js
  for downloadBodyReps to make sure the error code was explicitly null rather
  than undefined.

- I cleaned up comments as I went.

- mail-fakeservers enhancements that get pulled in please see the commit comment
  there: https://github.com/mozilla-b2g/mail-fakeservers/pull/28

Testing-wise, we have the following coverage:

- The unit tests I added to browserbox above.  They're pretty simple, but get
  us coverage of utf-7 encoding/decoding verification which we don't test
  in here.

- Added a unit test for the path-generating logic that has pretty good coverage
  (I feel).

- Added a fakeserver-using test that makes sure we create the folders and also
  tests both of the expected exceptional cases: "the folder totally already
  exists and it's known locally, dude", and "the server ALREADYEXISTS on the
  server".  Not explicitly tested is that if the server just outright fails
  that we generate the correct error.  However, I manually verified we do this
  during the process of development because of doing this TDD-style.