virt.capabilities refactoring
virt.capabilities refactoring

Extract the libvirt-handling code from virt.capabilities into a
virt._capabilities function accepting an opened libvirt connection.
This allows reusing the code in other functions with easy connection
handling.

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt