Return real message UID from IMAP server. Added function to return the current UID validity.