nodeinfo: Check for SYSFS_INFINIBAND_DIR before open
nodeinfo: Check for SYSFS_INFINIBAND_DIR before open

Commit id 'ac3ed2085' causes 'virsh nodedev-list --cap net' to fail
on any system without SYSFS_INFINIBAND_DIR (/sys/class/infiniband).

Rather than assume it's there and fail on the attempt to open the
non-existent directory, check if it's there - if not, return
success and move on. Also fix caller to check < 0 upon return.

As reported by Suren Hajyan <shajyan@redhat.com> from run of unit tests

jfehlig/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,olafhering/libvirt,zippy2/libvirt,fabianfreyer/libvirt,taget/libvirt,eskultety/libvirt,rlaager/libvirt,andreabolognani/libvirt,taget/libvirt,libvirt/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,olafhering/libvirt,andreabolognani/libvirt,jfehlig/libvirt,agx/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,crobinso/libvirt,rlaager/libvirt,jfehlig/libvirt,datto/libvirt,andreabolognani/libvirt,agx/libvirt,taget/libvirt,nertpinx/libvirt,crobinso/libvirt,eskultety/libvirt,crobinso/libvirt,rlaager/libvirt,datto/libvirt,zippy2/libvirt,agx/libvirt,datto/libvirt,VenkatDatta/libvirt,olafhering/libvirt,zippy2/libvirt,libvirt/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,rlaager/libvirt,olafhering/libvirt,taget/libvirt,jardasgit/libvirt,eskultety/libvirt,datto/libvirt,eskultety/libvirt,eskultety/libvirt,libvirt/libvirt,jardasgit/libvirt,datto/libvirt,jfehlig/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,rlaager/libvirt,agx/libvirt,fabianfreyer/libvirt,zippy2/libvirt,jardasgit/libvirt,nertpinx/libvirt,jardasgit/libvirt,agx/libvirt,libvirt/libvirt,crobinso/libvirt,VenkatDatta/libvirt,taget/libvirt