security(passwords): switches password hashing to password_hash()

(replaces #7495)

This gradually migrates users to modern hashes as they log in; deprecates
setting the salt/password attributes in favor of a new setPassword() method
(setting salt/password continues to work but will revert the user to the
legacy MD5 hashing); and moves core password functionality to a
PasswordService object.

Fixes #4665.


Nitpick: the upgrade name implies that running this upgrade makes hashes better, but in fact it only adds a new column.