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

apply() changes the in-memory instance of SharedPreferences and writes to the disk asynchronously, rather than synchronously, which commit() does. Since these are done on the UI thread, they should be asynchronous (doing blocking IO on it isn't a neat idea).