Add some explicit casts around use of IMAP UIDs or sequence numbers.
The IMAP spec says that these are 32-bit.  libetpan declares them
as uint32_t but MailCore uses NSUInteger, which is now potentially
a 64-bit number and Xcode 5.1 is warning about it.

The explicit casts do no harm because the IMAP spec guarantees that
these numbers are small enough, and we're using a 32-bit build anyway.