Factorize password hashing.

git-svn-id: http://textpattern.googlecode.com/svn/development/4.x@5598 2fea6a4d-a838-0410-917b-93a53c48e9d2
Update password hashing examples.

git-svn-id: http://textpattern.googlecode.com/svn/development/4.x@5599 2fea6a4d-a838-0410-917b-93a53c48e9d2