New hook for local DBI password hashing
See #3231 (closed)
Plugins can now add own hashing scheme. In the future we might even provide a couple by default (such as pbkdf2, argon2, etc)
In, addition I did some refactoring to always use prepared queries when storing passwords