io: Ensure all pending events are consumed in one libusb_handle_events call

Before this patch if ie multiple hot-plug events were pending, multiple
handle_events calls would be necessary to handle them all, this patch
changes handle_events so that the poll is re-done to check for more events
if there was activity on any of the special fds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
hotplug: Fix usb_device memleak with hotunplug events pending on libusb_exit

Closes #150

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
core: Make LIBUSB_DEBUG environment variable also work from libusb_exit

libusb_exit sets usbi_default_context to NULL, modify usbi_log_v so that
it still honors the  LIBUSB_DEBUG environment variable in this case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Windows: Fix a crash when HID transfers return no data

* Issue reported by Surmakyynis
* Closes #160
core: fix Doxygen warning

libusbx/libusb/libusb.h:153: warning: no matching file member found for
libusb_cpu_to_le16()Possible candidates:
  static uint16_t libusb_cpu_to_le16(const uint16_t x)

Thanks to Serhat Sevki Dincer for the bug report
http://sourceforge.net/mailarchive/message.php?msg_id=31719691
Windows: Add Visual Studio 2013 solution files

* Also update gitignore
* Closes #162