Implement a uid-polling helper for IMAP initial sync.

In the case that a user has e.g. a very large inbox, our current design
has the shortcoming that, during the initial sync, it won't continue to
download new messages. This is untenable for the user experience, so
we're solving it by having a parallel greenlet during this time that
keeps checking for new UIDs and adding them to the top of the initial
sync uid download stack.