Bug 987931 - [email] cronsync's self-close races an IndexedDB commit, partial, r=mcav

rebasing cleanups and review nits