Bug 834448 - [email/activesync] Fix refreshing folders after changing the sync range

This has r+ from @asutherland over at https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/116 (see that PR for unit tests as well).