Don't overwrite WebUI password when changing preferences

The input field to change password does not contain the actual
password, but its hash. When the preferences are saved, the hashed
password is considered as a new password.
Prevent this by comparing the new password with the hash of the
previous password.

Closes #2241.
What happens is that we populate the input field with the hash rather than the actual password (and there's no way around this). This means that the preferences are saved, setWebUiPassword() receives the hash of the password instead of the actual password, it calculates its md5 and then gives the hash of the hash to setValue(), which is different than the current hash stored in the preferences.