Replace IMAP class with PEAR Net_IMAP

This removes dependencies on PHP's IMAP extension.

Some hosts may not include the IMAP extension,
or may not compile it with SSL, which is needed for Gmail.