Tighten synchronization with the server:
- Record a somewhat finer approximation of the status of our
synchronization with the server, which lets us be more careful
about deleting caches for expunged messages: only if our mapping
between sequence numbers to UIDs is synchronized with the server
is it sensible to delete caches for expunged messages.
- If our length is desynchronized with the server when we update the
folder's length because of an EXISTS response, and if all the UIDs
that we know about are synchronized with the server, then no
messages have been expunged from the folder, and its length has
only increased. In this case, signal anINCREASE-LENGTH event,
rather than a SET-LENGTH event. This avoids regenerating summary
buffers when reconnecting if no messages have been expunged by
another client.