Implement OnSharedPreferenceChangeListener callbacks on commit.

The onSharedPreferenceChanged method will be called on all listeners for any keys that changed (or were removed), which matches what the Android API promises. The commit also includes removing a redundant for loop.