Bug 800402 - [email/backend] UI: Show the number of unread messages in the message-list header after the folder name. r=asuth

Land the back-end parts of bug 800402 and bug 888955 which it depends on.
The UI parts are separable and we're landing the back-end stuff on its own to
avoid back-end bit-rot.

The changes in here exactly correspond to those in:
https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/328