Bug 822882 - fix bisection on initial fetch - logfix, rs=squib
Merge pull request #143 from asutherland/refresh-glitch-explore

Bug 822882 - fix bisection on initial fetch - logfix, rs=squib
Bug 838009 - support sdcard storage for saving all types of attachments
Merge pull request #145 from dominickuo/support-sdcard-storage

Bug 838009 - support sdcard storage for saving all types of attachments, r=asutherland, a=leo+
Bug 822882 - Initial bisect sync fix try #2.

makeDaysBefore's use of makeDaysAgo was foolish since it caused unexpected
rounding up.  Because of the various deadlines and pressures, I'm sort of
running around with my head cut off, so this wasn't a tremendously surprising
oversight.

This includes a timezone stopgap fix; I'm probably going to have to implement
the IMAP fake server soon for other horrible things that are going on, which
should eliminate the need for this hack.
Merge pull request #146 from asutherland/initial-refresh-1-day

Bug 822882 - Initial bisect sync fix try #2. a=bustage-fix
Bug 838009 - fixes for change to 'sdcard' devicestorage. r=asuth

- test fix where we checked the device storage in use
- secret debug logging fix

I'm doing these as review fix-ups.
Merge pull request #147 from asutherland/sdcard-fix

Bug 838009 - fixes for change to 'sdcard' devicestorage. r=asuth
Bug 851262 - [email/IMAP] Bisection grow timezone logic generating zero-delta syncs that explode on gmail rs=squib

This is squashed; here are the notable commit messages:

:squib brought up a good point that it wasn't clear why I wasn't adding
the timezone offset to the limit.  Which caused me to realize that when
dealing with NOW(), we indeed should be applying the timezone offset
since our accuracy ranges are all centered around the local timezone of
the server.

Additional timezone fixes relating to NOW():

The previous commit did not go far enough.  Specifically, all uses of NOW()
turned out to be suspect and needing to be fixed where it dealt with accuracy
ranges or talking with the server.  This also entailed fixing makeDaysAgo to
take the timezone offset, plus makeDaysBefore for when the date is null and
it ends up calling makeDaysAgo.

It was particularly important to calculate our effective end TS with the
timezone offset for our bisection calculation.  Otherwise, we ended up with the
same bisection loop on 2 days.

The other change is that when growing in the FUTUREWARDS direction, we also
want to observe the highest legal endTS there too.  We only differ in how we
calculate the initial endTS, but we still don't want to name a date that's
still in the relative future as our accuracy range, by definition, can't
include it.
Merge pull request #148 from asutherland/growth-refresh-1-day

Bug 851262 - [email/IMAP] Bisection grow timezone logic generating zero-delta syncs that explode on gmail. rs=squib
Bug 852710: defer loading protocol modules until first use
Use Array.slice instead
Fixes failing test for fake/account, also fixes issue with getFolderMetaForFolderId so setting up fake account in gaia works.
lazyInit now lazyConnection, pass failString through to makeConnection in all activesync modules, always give this.conn a value in constructor, in lazyConnection, make explicit errback local variable to make use clearer, move up exports in mailapi/composer with comment, outdent require callback in imap/folder to make merge of later change easier.
Merge pull request #151 from jrburke/onlinedelay

Bug 852710: defer loading protocol modules until first use r=asuth
[activesync] Encode the message buffer to UTF-8 before sending on EAS 12.x and lower
Merge pull request #154 from mozsquib/activesync-sendmail

Bug 853659 - [email/activesync] Fix sending mail on Exchange 2007 and lower
Remove sed step since no longer necessary, and OS X's sed does funny things with file endings that cause noise in gaia diffs. r=asuth
Merge pull request #155 from jrburke/remove-sed

Remove sed step since no longer necessary r=asuth
[activesync] Fix getting the item estimate for older versions of Exchange