Add hid_write_timeout per issue #198

This extends the API with an `hid_write_timeout` function that allows an early exit in the event of a write failure (usually caused by devices failing to respond correctly).
Per #190, this should probably be a -1 timeout (i.e., infinite).