darwin/windows: Find interface descriptor by bInterfaceNumber

For some (non USB-compliant) devices the interface number doesn't match
its index in the list of interfaces in the configuration descriptor. For
robustness and consistency across platforms, find the descriptor by
iterating over the list to match the bInterfaceNumber.

References #1093
References #1039
References #1175
Closes #1191

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
3 files changed