Fix hang when user has no libusb access because of plugdev under e.g linux. Add some better sanity checking when using libusb_open and cleanup accordingly.
Fix hang when user has no libusb access because of plugdev under e.g linux.
Add some better sanity checking when using libusb_open and cleanup accordingly.

Fixes hang (debian 8, amd64, libusb 1.0.19):
libusb: warning [add_to_flying_list] failed to arm first timerfd (errno 9)
libusb: warning [libusb_close] internal signalling write failed, closing anyway

gtalusan/stlink,gtalusan/stlink,simonjwright/stlink,simonjwright/stlink