usbdev: Extract libusb1 device discovery into a separate file

This is a backport of the upstream `commit 1d507a07` in
preparation for pulling the upstream dediprog driver into
our tree.

The upstream patch has been greatly modified to align
better with our tree and we fix the missing
'#include <inttypes.h>' here.

BUG=chromium:478356
BRANCH=none
TEST=still builds

Change-Id: I76eb9a86a63cda5ae9469b8d861d7b1df85dbf58
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1492812
Reviewed-by: Martin Roth <martinroth@chromium.org>
4 files changed