usb1: Strengthen device iterator.
Do not rely on globals once USBContext.getDeviceIterator has entered its
loop: it could stay stuck there until interpreter shutdown, at which point
globals are not safe to access.
Also, explicitly close underlying iterator in _validContext so it cannot
escape context validity protection.
Also, opportunistically close the generator in getByVendorIDAndProductID,
although no functional change is expected here - at most device list memory
deallocation will happen a bit earlier than normal.
2 files changed