Add pkgrepo tests for CentOS

Ubuntu ones will follow soon.
Fix pkgrepo tests when python file is run by itself on CLI
Remove grains requirement

I had this code here in an early draft of this test, but the grains are
no longer needed here as the stuff that requires grains has been moved
out of the test function and into the SLS files that are run by the
test.
Add an assert to ensure that the state.sls return dict isn't empty
Merge pull request #8820 from terminalmage/tests

Add pkgrepo tests for CentOS