Fix new mail counting (store last sync, parse dates, etc.).