Refactored the promote user functions

The hasher object contains two new functions: promote_hash and demote
hash. These functions effectively turn the management functions into
thin wrappers that only seek for the username and ensure everything is
in its right place.

Test cases have been updated to consider these new two functions.