nodedev: Add the missing PCI dev checks for 'mdev_types' capability
nodedev: Add the missing PCI dev checks for 'mdev_types' capability

Similar to commit @f44ec9c1, commit @500cbc06 introduced a new nested
'mdev_types' capability, however the mentioned commit didn't adjust
virNodeDeviceNumOfCaps and virNodeDeviceListCaps functions accordingly
to provide proper support for this capability.

After applying this patch the following python snippet returns the
expected results:
    import libvirt
    conn = libvirt.openReadOnly('qemu:///system')
    devs = conn.listAllDevices()
    for dev in devs:
        if 'mdev_types' in dev.listCaps():
            print dev.name(),dev.numOfCaps(),dev.listCaps()

Signed-off-by: Dan Zheng <44662128ca44c543875285bc656741869be243d5@redhat.com>
Signed-off-by: Erik Skultety <2c14d38fa47c8799f1b9c16280abe27f8edfec6e@redhat.com>

eskultety/libvirt,libvirt/libvirt,andreabolognani/libvirt,crobinso/libvirt,jfehlig/libvirt,libvirt/libvirt,olafhering/libvirt,nertpinx/libvirt,jfehlig/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,olafhering/libvirt,crobinso/libvirt,crobinso/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,zippy2/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,libvirt/libvirt,nertpinx/libvirt,jardasgit/libvirt,nertpinx/libvirt,jardasgit/libvirt,eskultety/libvirt,crobinso/libvirt,jfehlig/libvirt,zippy2/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,libvirt/libvirt,jfehlig/libvirt,nertpinx/libvirt,eskultety/libvirt,olafhering/libvirt,eskultety/libvirt,zippy2/libvirt,eskultety/libvirt,jardasgit/libvirt,zippy2/libvirt,nertpinx/libvirt,jardasgit/libvirt,olafhering/libvirt,fabianfreyer/libvirt