Implement a migration procedure for Android

We need to clean some preferences also on Android, not only on desktop.

See !1177 (merged).