windows: back off re-initializing a device after a hub IOCTL timeout

A device whose initialization fails on a hub IOCTL timeout is left with
priv->initialized unset, so every subsequent libusb_get_device_list()
re-attempts the initialization and pays the full timeout again. For a
polling application this turns one wedged device into a persistent
multi-second stall on every scan, and if cancellation of the timed-out
requests never reaches a terminal state, each retry can also park
another orphaned request and event handle.

Record a per-device backoff (keyed by device instance ID) when
initialization fails on a timeout, and skip re-initialization until it
expires, 30 seconds later. The backoff is deliberately not cleared on
reconnection, since a replug cannot cheaply be told apart from a
still-wedged device: a replugged healthy device may thus stay invisible
for up to one backoff period, which is self-healing and much cheaper
than stalling every scan. A successful initialization clears the
device's entry.
1 file changed