refactored mails class
imap msg dict doesn't seem to throw a keyerror, so throw it explicitely
has_key() is deprecated
use a dict instead of a list for faster id lookup
discard mails with identical ids (both, imap and pop3)
added comments