Timeout parameters for synchronous read / write calls

This adds a timeout to boost::asio::read / boost::asio::read_until / boost::asio::write to prevent them from blocking the device thread due to a malformed packet. If the call does not complete before the timeout period expires, then the call will be cancelled and an exception will be thrown.

All synchronous calls in the device code have been replaced with their timed equivalents.