Implement hid_write_timeout for Mac (untested). Simplify hid_write on linux.
Merge commit '7af101e' into hid_write_timeout