Add grains_list state module

grains_list state module for manage list type grains on the minion
Add __virtual__ function for memcache modules
Fix regression in file.managed

Pull request #8818 caused a couple of regressions. Firstly, it assumes
that, if "mode" is not specified (and thus defaults to None), that you
want the permissions to be equal to those dictated by the umask. This
means that a file with perms 640, which already exists, will be chmod'ed
to 644 if the system umask is 022 and no "mode" parameter was specified
in the state. This is not the expected behavior.

Secondly, the calculated perms are passed to file.check_perms as an
integer whose octal representation is the correct value for the file
permissions (i.e. 0o644, which is == 420 in decimal). However,
file.check_perms is designed to be run from the CLI, and thus requires
a value of 644 (decimal) to be passed, in order to set 644 permissions.
file.check_perms can also accept the mode as a string, so this is how
this commit passes the value to file.check_perms when a new file is
created.
Starting work on new set of tests for fileclient.

Also, more integration testing for templates.
Fix bug in pkgrepo when switching to/from mirrorlist-based repo def

This adds a check to ensure that both of mirrorlist and baseurl aren't
specified, and also deletes mirrorlist when baseurl is specified (and
vice-versa). Additionally, rather than returning a string containing
errors when they are encountered, raise an exception.
merge grains_list state module to grains state module
Merge pull request #9113 from pengyao/develop

Add grains_list state module
Merge pull request #9132 from cachedout/file-client-tests

Starting work on new set of tests for fileclient.
Merge pull request #9131 from terminalmage/fix-filemanaged-regression

Fix regression in file.managed
Merge pull request #9133 from terminalmage/issue9121

Fix bug in pkgrepo when switching to/from mirrorlist-based repo def
fixed a typo about reST links
Merge pull request #9136 from pengyao/grains

fixed a typo about reST links
Merge pull request #9135 from pengyao/memcache

Add __virtual__ function for memcache modules
Add unit test for the ssh password regex matching