Don't fetch deleted messages from IMAP folder

Fetching messages from an IMAP folder within a specific date range returns
messages marked as deleted, also. Unlike every other getMessages() method,
which filter out deleted messages.
This leaves server deleted messages untouched in the mail conversation
view, even when the folder is synced manually.

This patch adds "NOT DELETED" to the IMAP search command, when searching
for mails in a given date range.

Change-Id: I49e4adfcab9a1de1d1baa4700462a82df651f3cb
Email: UG translation

Change-Id: I175333692d80ae0d2899c820e172b235ad247f01
email: add support for Server Name Indication (SNI)

Change the underlaying socket factory reference to SSLCertificateSocketFactory which
has support for SNI since 4.2, and remove the access to the obsolete methods from
the old factory reference.
This change will setup the socket with a proper hostname prior to the ssl handshake.

Change-Id: I494312721979a40a01699f5c15028dfafe7d07a9
JIRA: CYAN-3775
Issue: https://jira.cyanogenmod.org/browse/CYAN-3775
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>