Clean up broken whitespace in list_for_each_entry() macros

Introduced by commit aa77b02da65afb0332b9e6853dae9e4dcda00bfa.
Windows: Fix deadlock when submitting transfers

The Windows backend needed to call usbi_fd_notification() from
submit_transfer() because a new event source is added for every WinUSB
transfer. This could cause a deadlock when attempting to lock the event
lock if another thread was processing events on the just-submitted
transfer.

The deadlock comes about as the thread calling libusb_submit_transfer()
acquires the transfer mutex before trying to acquire the event lock; this
is the other order of lock acquisition from an event thread handling
activity on the just submitted transfer. This could lead to one of two
deadlocks:

1) If the transfer completes while usbi_fd_notification() is waiting for
the event lock and the callback attempts to resubmit the transfer.

2) If the transfer timeout is hit while usbi_fd_notification() is waiting
for the event lock then the attempt to cancel the transfer will deadlock.

This patch fixes both of these deadlocks by having libusb_submit_transfer()
only call usbi_fd_notification() after having released the transfer mutex.

This deadlock was always present in the Windows code, but temporarily
deleted by mistake in commit 6506013c6d4face34cfec79dd0584e9f528cbc6a
and later restored in commit 325a8416697cf69b9b926ed68720f12b1aedf940.

libusbx.git commit 1ed09c7b2a5fc27c3cfea21740584879781bff67

[stuge: Touch up commit message]
autogen.sh: Exit script on first error

libusbx.git commit c74fe3ab703a28c6d8c3755213e3736c5d1eb35e
autogen.sh: Correctly pass arguments containing spaces to configure

libusbx.git commit d20cd4f3573fe74d0ec5a4e1d60c9d291547ace4
Core: Return LIBUSB_ERROR_IO on sync API TRANSFER_ERROR and _CANCELLED

This is much more appropriate and also fixes gcc -Wswitch-enum warnings.

libusbx.git commit 30ccbd773bc02d5dfd21e02bfba6d58234f59393
Darwin: Fix warning: comparison between signed and unsigned

libusbx.git commit c5c6b0e69a13786e48b2b6254c8e5458dc6716cc
io.c: Only disarm timerfd when no flying transfer has a timeout

Commit 4630fc22cff8ad3e1afa9b223378c0aabe282b5c made libusb work
correctly when built to use timerfd but run on a kernel without
timerfd support. The commit unfortunately also broke the logic
during transfer completion which decides if the timerfd will be
disarmed or not, and disarm_timerfd() was called even if the
timerfd had already been armed with the next flying transfer
timeout.

Before the offending commit the timerfd would be disarmed only
when arm_timerfd_for_next_timeout() reported that there was no
flying transfer with a timeout. Let's restore that behavior.

The bug was spotted through code review both by the author and
by Hans de Goede, but was not squashed until Vincent Pellier
experienced transfers never timing out, and helped confirm
the source of the problem. Many thanks!

References #73.
examples/Makefile.am: Use the implicit _SOURCES rule

By default automake looks for a source file foo.c for a foo binary.

libusbx.git commit 7e52e1e7534ead3f66b13bdcb28ac8587ff47ab0
Windows: Add INSTALL_WIN.txt

libusbx.git commit 75b1cf81db74357f55cc4d0f596ef19a6a25c5cd

[stuge: Remove trailing whitespace]
.gitattributes: Set INSTALL_WIN.txt eol=crlf attribute
io.c: Avoid timerfd race condition between completion and new submit

An event handler thread working on transfer completion for the last
flying transfer with a timeout can end up racing with a call to
libusb_submit_transfer() from a second thread, so that the timerfd
gets disarmed even though libusb actually again has a transfer with
a timeout.

By arming or disarming the timerfd during completion strictly
according to remaining flying transfers while also holding the
flying_transfers_lock this change ensures that a new transfer can
not be added to the flying list until the completion code path has
armed/disarmed the timerfd according to the current flying list.

Hans de Goede describes the race condition situation in
http://sourceforge.net/mailarchive/message.php?msg_id=29520709

Signed-off-by: Peter Stuge <peter@stuge.se>
Windows: Stop leaking event handle when destroying condition variables

usbi_cond_destroy() must close the handle created by usbi_cond_intwait().
libusb.h: Fix #145 libusb_ref_device() and libusb_unref_device() typos
Windows: Remove msvc/inttypes.h

This file might have been needed for platform abstraction, except that
all code shared among platforms doesn't need the file. Windows code in
particular does not need to use the file.

The file was used in one single place, where the PRIu64 define has now
been replaced with it's value "I64u".
Windows: #include <windows.h> in header files
INSTALL_WIN.txt: Correct Windows backend webpage URL
io.c: Handle >= 1 second transfer timeout in libusb_submit_transfer()
io.c: Handle >= 1 second transfer timeout in libusb_wait_for_event()
configure.ac: Use LIBS instead of PC_LIBS_PRIVATE
configure.ac: Move THREAD_CFLAGS into AM_CFLAGS