email: prevent NPE caused by null cursors

Change-Id: If819f14d4cf25d6ba35110a7a22125909a6f87dc
JIRA: CYAN-4577
Issue: https://jira.cyanogenmod.org/browse/CYAN-4577
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Merge remote-tracking branch 'cm/cm-11.0' into HEAD