Make WriteFile use Events to signal when write requests are
finished. This avoids lockups on Windows platforms during hid_write. (see OP-1261)
Merge remote-tracking branch 'origin/D-Lite/OP-1261-winHIDfix' into next