Preserve IMAP folder sync order.

We want to make sure that we sync e.g. the Inbox folder before other ones
during initial sync.