Use more readable error messages.

To a user, it's not immediately clear that a given password was not well
formed.  The refactored error messages should fix that.  See bug
<https://bugs.torproject.org/11143> for context.