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.


Maybe assign the services to class properties in the constructor?