Nested dict recursion for subdict_match

This code needs some careful review because it's used in a bunch of places and this is a potentially substantial change. What we're doing here is to recurse back through the function if we encounter a dict that's an element of a list. This solves match against something like {'baz': [{'foo': 'bar}]} but it could have unintended side-effects that I haven't yet encountered. It supports matching against the sub-list-dict (just made that term up) either directly like 'baz:foo:bar' or 'baz:*:foo:bar'.

Comments welcome. Refs #9991.
Don't lstrip(). Thanks @terminalmage for the reminder.
Merge pull request #10250 from cachedout/#9991

Match against lists in nested dicts in grains