Make error handling during sync more consistent with Anki Desktop
Add internal check to stats generator as collection may have been closed while task was queued
Merge pull request #560 from timrae/syncErrorCatching

Sync error catching