Use uid_ methods for retrieving IMAP messages (#14101).
Patch by Pierre Pretorius.
Authored by: jplang 2013-05-28
Parent: [r11905]
Child: [r11907]