Compound matches, such as nodegroups, can now be specified as lists. This
avoids splitting on whitespace which may be part of a key or value.
Right now this only works for nodegroups. Making the argument to "-C"
(compound list) a JSON argument is a future task.
```
07:39:05,449 [salt.minion :1178][ERROR ] A command in 'pip.list' had a problem: Traceback (most recent call last):
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/bin/pip", line 9, in <module>
load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pkg_resources/__init__.py", line 546, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2666, in load_entry_point
return ep.load()
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2339, in load
return self.resolve()
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pkg_resources/__init__.py", line 2345, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/__init__.py", line 13, in <module>
from pip.commands import commands, get_similar_commands, get_summaries
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/commands/__init__.py", line 6, in <module>
from pip.commands.bundle import BundleCommand
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/commands/bundle.py", line 5, in <module>
from pip.commands.install import InstallCommand
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/commands/install.py", line 5, in <module>
from pip.req import InstallRequirement, RequirementSet, parse_requirements
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/req/__init__.py", line 3, in <module>
from .req_install import InstallRequirement
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/req/req_install.py", line 20, in <module>
import pip.wheel
File "/tmp/salt-tests-tmpdir/6833-pip-upgrade-pip/lib/python2.6/site-packages/pip/wheel.py", line 23, in <module>
from pip.exceptions import InvalidWheelFilename, UnsupportedWheel
ImportError: cannot import name InvalidWheelFilename
```
If a nodegroup was re-used - even if it wasn't a circular reference - it
would fail the nodegroup expansion with the following message:
Failed nodegroup expansion: illegal nested nodegroup "min"
This was simply because already-visited nodegroups are pushed into `skip`
but were never popped.
* Add another test case for this situation.
* Pop the current nodegroup from `skip` when leaving the expansion
context
Fixes: #22797