Android: Use apply() instead of commit() for changes

apply() changes the in-memory instance of SharedPreferences and writes to the disk asynchronously, rather than synchronous which commit() does. Since these are done on the UI thread, they should be asynchronous.