Reopen collection at end of sync
Leaving the collection in the closed state at the end of the sync (2337d88) was becoming a bit unreliable (for example crash on exporting collection after sanity check error) and it's cleaner to just reopen it on the spot
Add timeout to DeckTask.waitToFinish()
Occasionally DeckTask.waitToFinish() causes AnkiDroid to hang, for example in the current version on Google Play, sometimes AnkiDroid hangs during a sync if you try to sync while initially logged out. This also adds some more debugging information to help diagnose the root cause of that issue, though it may be due to the closing of the collection.