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.
setValue() already performs the same check. (on the hashes though).
PS: I am reading this on github, I didn't open it up in Qt Creator to investigate. So I might be missing something here.