Fix issue 2336

During sync, we expect the collection to remain in a closed state in some cases, which conflicts with the `Loader` framework which sometimes automatically wants to load the collection. 

This was causing [issue 2336](https://code.google.com/p/ankidroid/issues/detail?id=2336), where (in tablet mode) a full sync would fail, and the app could freeze due to Android trying to automatically re-open the collection when libanki wants it to be closed -- for example when resuming the app after switching to another window. The issue generally doesn't occur when not in tablet mode, as only the `Loader` in `StudyOptionsFragment` is resumed automatically by Android.

This fix is a bit of a hack, which sets a static boolean value in `AnkiDroidApp` whenever a sync starts, and makes the `Loader` cancel trying to reload the collection when this value is true.