libusb: check for failure of hid_init()

Return NULL from hid_enumerate() and hid_open_path() if hid_init() fails.
linux/libusb: do not check bDeviceClass on enumeration

Some composite devices do not have bDeviceClass set to
LIBUSB_CLASS_PER_INTERFACE and were ignored when enumerating HID devices.

Ignore checking the bDeviceClass as we will be checking interface
bInterfaceClass later anyway.

Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
linux: Use poll() even in non-blocking mode

It appears that calls to read() when in non-blocking mode will not set errno
to other than EAGAIN when the a device has been disconnected.  Note that
this is the same errno code set when there is simply no data to return.

Make it so that poll() is used, in non-blocking mode, to check the
status of the device. In blocking mode though, poll() is not needed.
Merging upstream changes.