[usb transport] Make sure bulkwrite is finished before starting next one

sendData calls setData in the bulkwriter, which should only be done when
the thread is not running. However it never verifies that the thread
has finished after the previous write. This leads to a race where
sendData may collect the result, then return and be called again before
the writer thread has had a chance to exit.

Fixed by adding a thread wait.