Stop mining if server configuration is changed

This updates the ServerPreferences to send change notifications to the
PreferenceReceiver, which automatically stops mining if a server preference
has changed. It also resolves an issue with calling stop() while already
stopping.