[usb transport] Establish SIGUSR1 handler even when running as a plugin

The I/O thread management relies on sending SIGUSR1 to wake up
threads that are blocked on I/O. This only works if a handler has
been established in the receiving thread, otherwise it'll just
kill the process.
[usb transport] Fix potential segfault in input buffer handling

The fix is not ideal but Works For Now.
[usb transport] Make sure InterruptWriterThread actually exits

If the InterruptWriterThread was in the wrong part of its loop
then it might not have noticed the main thread calling exitThread.
[usb transport] code cleanup: tidy ControlReaderThread loop

The ControlReaderThread had an unnecessary nested loop. Flattening it
to one loop makes its error handler more similar to that of the other
threads and thus easier to understand.