Core: fix another compiler warning in libusb_setlocale()

* VS2012 (64 bit) produces the following in strerror.c(156):
  warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
Linux: Fix get_kernel_driver_active() when another app has claimed the interface

When another app has claimed the interface, IOCTL_USBFS_GETDRIVER will
succeed and report a driver of "usbfs" being attached.

Since this is not a regular kernel-driver (and detach_kernel_driver does
not detach it), get_kernel_driver_active() should return 0 in this case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Use Android logging when building on Android

Closes #101

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Revert "Core: Don't wait for completion if cancel_transfer failed"

This reverts commit 2f5023c41d3176e56bf0abc521b7c5f8b1ac4664. 2f5023c4
was an attempt to fix: https://github.com/libusbx/libusbx/issues/76

As seen in: http://libusbx.1081486.n5.nabble.com/Libusbx-devel-libusb-interrupt-transfer-does-not-return-in-case-of-error-td626.html

[372849.680990] [0000275b] libusbx: error [reap_for_handle] reap failed error -1 errno=14
[372849.681752] [0000275b] libusbx: error [handle_events] backend handle_events failed with error -1
[372850.680466] [0000275b] libusbx: warning [handle_timeout] async cancel failed -5 errno=22

The problem begins with reap_for_handle failing with errno == 14, which is
EFAULT. So the real problem is the application passing in an invalid (or too
short) buffer, and thus is an application bug.

The fix masks this problem, but causes the problem of calling
libusb_transfer_free() on a non finished transfer, so it is no good.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Conflicts:
	AUTHORS
	libusb/version_nano.h
sync.c: Do not free an incompleted transfer

Before this patch the code in sync.c would free an incomplete transfer
when libusb_handle_events_completed exits with an error twice in a row.

But we should never free an incomplete transfer, otherwise we may end up
referencing free-ed memory later on.

This patch simply logs an error and keeps on trying until the transfer
completes.

Note that if libusb_handle_events_completed keeps throwing an error the
entire time, without ever completing the transfer, this patch effectively
replaces a potential crash / unspecified behavior, with an endless loop
and logging a ton of errors making clear what is going on.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sync.c: Remove code duplication

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
autogen.sh: Honor NOCONFIGURE=1

See http://people.gnome.org/~walters/docs/build-api.txt

Hdg: I know this may seem unnecessary since we also have bootstrap.sh, but
the Gnome people are doing continues build testing of Gnome + dependencies
and having all autogen.sh scripts support NOCONFIGURE=1 makes live easier for
them. Note that in return we get "free" continues build-testing and patches
and / or a heads up when we break things.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Prepare for 1.0.16-rc1 release

Signed-off-by: Hans de Goede <hdegoede@redhat.com>