IMAP: save the number of unread/... messages during every mailbox sync

The sync state contains a ton of properties which are not critical for mailbox
updates, but are used by the GUI when showing states of the mailboxes. As it
happens, these numbers were not getting updated at the time the mailbox state
itself was recalculated and pushed to cache.

What should be done of top of this is saving the numbers whenever the STATUS
response arrives. Any change doing that must make sure that it does not clobber
the important SyncState members which are used for synchronization, though.
refactoring

This will become useful in the next commit.
IMAP: store the results of STATUS queries into the cache

See comments inline for why it's important to *not* save EXISTS, UIDNEXT and
other sync-related data. We're saving just those bits which are useful for the
user, but *not* critical for the sync.

In future, this might be extended to also save the total number of messages, but
if this ever happens, it MUST NOT go into the EXISTS field or mailbox syncing
will be utterly broken.
Merge branch 'bug-332113'

REVIEW: 116801