Move out htpasswd functions into webutil module
Merge pull request #8124 from techhat/webutils

Move out htpasswd functions into webutil module
Add unit test for salt.utils.which

This is a Linux-only test, it will need some mock love to make it
suitable to test for windows paths.
Provide a mocked version the tests to reach windows specific code.
Add some comments to explain whats going on.
Ensure that the variable candidate is referenced 
before assignment
Fix a the return from setting a rabbitmq users tag, this was failing
religiously due to the lack of tabs in the output.

Fix the documentation for the perms attribute (was permissions).

Fix the perms handling, as it is a list of dicts that is called in.
Merge pull request #8128 from asachs/develop

Fix setting rabbitmq users tags and permissions
Add unit test for salt.utils.which

This is a Linux-only test, it will need some mock love to make it
suitable to test for windows paths.
Merge branch 'features/mocked-which-test' of https://github.com/s0undt3ch/salt into s0undt3ch-features/mocked-which-test
Merge pull request #8129 from terminalmage/which-test

Add a test for salt.utils.which
Properly determine conf_dir

lstrip() strips each char independently. Not the whole string as a whole
Merge pull request #8130 from UtahDave/develop

Properly determine conf_dir
Add space to make pylint happy
Merge pull request #8131 from UtahDave/develop

Add space to make pylint happy
Use PATHEXT in salt.utils.which on Windows

Fixes #8125.
If there is no hit, don't log just return None
Check if tok exists before use

The problem is described in #8078 and was introduced in 151759b.

I am not super happy with the solution here. It seems that checks for
required `load` keys are done differently all over master.py. The reason
why I choose to check for `tok` separately was to be able to pinpoint
which minions have not been upgraded to 0.17.1.

Moving forward the checks for `id`, `data`, `tgt`, `fun`, etc could be
logged the same way, if appropriate.
Fix copy-paste error
Tying tags and events to state files wasn't clear to me.
Also some typoes and escaping '*' chars.