Short-circuit calls to list functions for empty lists
Short-circuit calls to list functions for empty lists

As an optimizaton (and workaround for a bug in 0.4.3), do not call
virConnectList* functions if the coresponding virConnectNumOf* call
returned 0. Return an empty list instead.

Patch by Chris Lalancette

libvirt/ruby-libvirt,libvirt/ruby-libvirt,libvirt/ruby-libvirt