[threadio] Make m_statusLock actually protect m_status
cleanup: remove duplicate function
[usb transport] Straighten out InterruptWriter locking

In the process, renamed m_bufferLock to m_lock and discarded the old m_lock.
[usb transport] Straighten out BulkReaderThread locking

The thread was using a QMutex for control flow, which
doesn't work in Qt5 because in Qt5 you're not allowed to
lock a mutex in one thread and then unlock it in another.

Switched to using a QWaitCondition.

Also, for efficiency, switched to allocating just one
buffer and then trading it back and forth, instead of
allocating and freeing a new one for every packet.
bugfix: hold m_lock while using m_wait
bugfix: properly exit interruptwriter if interrupted

This avoids an assertion failure about the buffer still
being empty when the interruptwriter thread is woken up
for exiting
Merge pull request #14 from amtep/master

Fix use of QMutex for Qt5 mutex semantics