Add hotplug support to the Darwin backend.

Hotplug events are handled by the async event thread. This thread listens for
two events: kIOTerminatedNotification, and kIOFirstMatchNotification. If
either of these events fires the thread will iterate through the appropriate
iterator and will either enumerate or call usbi_disconnect_device depending
on the event.

While adding hotplug support it was discovered that when reading from the IO
registry we need to use kCFNumberSInt32Type for the device location. Using
kCFNumberLongType would cause locations to be sign-extended and not match
what is stored for the session id. This is now fixed.
Add hotplug support to the Linux backend.

There are two ways to configure hotplug support for Linux: udev, and netlink. It
is strongly recommened that udev support is used on systems that utilize udev.
We reenforce this recommendation by defaulting to --with-udev=yes at configure
time. To enable netlink support run configure with --with-udev=no. If udev
support is enabled all device enumeration is done with udev.

References: #17
darwin: allow control messages on devices we can not exclusively open
darwin: dpriv->device will never be NULL for a valid device. remove unnecessary code that handled this case
darwin: clean up extraneous includes
replace removed automake macro AM_CONFIG_HEADER with AC_CONFIG_HEADERS.

Fixes #159. Thanks to cazfi.
darwin/libusb_reset: reenumerate device if the device descriptor or any
configuration descriptor has changed

Some background: the Linux kernel causes a device to be reenumeration when
reset if the device's descriptors have changed. Darwin does not provide
this feature but instead provides a call to force the reenumeration of
a device. This behavior is required to support the firmware update
protocol used by some devices.

This patch updates darwin_reset to check if either the device or
configuration descriptors have changed. If they have darwin_reset will
ask the OS to reenumerate the device and return LIBUSB_ERROR_NOT_FOUND
or LIBUSB_SUCCESS accordingly.

Fixes #169
Don't set the USBFS_URB_SHORT_NOT_OK flag on the last URB.

Fixes: #142
darwin: add support for the LIBUSB_TRANSFER_ADD_ZERO_PACKET transfer flag.

The zero-length packet is sent by the async event thread if all the following
conditions are met:

1) The packet size is not a multiple of maxPacketSize, and
2) the transfer completed successfully.

References #6.
On windows do not set the hotplug pipe as non-blocking. I will leave it up the backend maintainers to figure out.
Fix usbi_log_v in the case where ctx is NULL (no default context).

Fixes #147.
darwin: add fcntl.h
windows: call usbi_sanitize_device to ensure the device descriptor gets cached
darwin: don't assume an interval of 1 or high/super speed

This patch updates submit_iso_transfer to use the bInterval value of the
endpoint and the speed of the device to determine the last frame of the
transaction.

Fixes: #165
Linux: Add support for the new get_capabilities ioctl

* There were a few (new) usbdevfs capabilities which libusbx could not
  discover in any other way then checking the kernel version.
* However, this presents the following problems:
  1) It is just not very pretty
  2) Given the tendency of enterprise distros to backport stuff it is not
     reliable
  3) Some of these features turn out to not work with certain host controllers,
     making depending on them based on the kernel version not a good idea
* Therefore a new USBDEVFS_GET_CAPABILITIES ioctl has been added to the kernel
  to offer a better way to find out a device's capabilities (technically
  the capabilities of the host controller to which the device is attached,
  but that does not matter).

Conflicts:
	libusb/os/linux_usbfs.c
	libusb/version_nano.h
Linux: Avoid unnecessary splitting of bulk transfers

* With the latest kernels it is no longer needed to always split large bulk
  transfers into multiple urbs. This patch takes advantage of this by not
  splitting when not necessary. Note that the non-split code path is in essence
  using the old split code path with an urb count which is always 1.
* This leads to more sane handling of large transfers with recent kernels,
  although our splitting code is well tested, not splitting at all still is
  a lot better :)
* When used with a recent kernel, this also fixes the problems, on XHCI attached
  devices, when a large bulk-in transfer ends with a short read in an urb other
  then the last urb.
* For more on this see: http://marc.info/?l=linux-usb&m=133797554910355

Conflicts:
	libusb/os/linux_usbfs.c
	libusb/version_nano.h
Use AM_CPPFLAGS instead of INCLUDES in examples/Makefile.am
Add definitions for Endpoint Companion and BOS descriptors.
Add APIs for parsing the Endpoint Companion and BOS descriptors.

Nathan: Modified the original patch to fit the interface now already
provided by the FreeBSD implementation of libusb 1.0 and fit with
the rest of libusb.h.

Some discussion: The FreeBSD API is not optimal. Further discussion
is needed to determine how to update the API without breaking code
that used the existing API. This discussion should probably involve
the FreeBSD developers and could be handled in a 1.0.x release.

An example has been added to show how to use the new API.

Fixes #110
update AUTHORS
darwin: don't need darwin_error_str if ENABLE_LOGGING is not defined