Use a SyncAdapter to synchronize the directory "the Android Way"

This prepares us to do synchronizations on regular intervals and also allows the user to enable and disable synchronization via the android settings. This would solve #859.

Also, synchronizing the directory from the app could be done by calling this SyncAdapter.
Fixing style issues
Moving account creation to initial setup + package upgrade listener