read_exact: Fix endless loop after device disconnect
read_exact: Fix endless loop after device disconnect

read_exact() function doesn't take into account return value of 0
from read() call. This generally means EOF and it was happening
eg. when remote device was rebooted.

The code was hanging in endless loop in the block:
  while (have_bytes < buffer_size) {...}

This was resulting in 100% CPU usage of collectd routeros plugin
process.

This commit is fixing this. After this, collectd is able to detect
connection problems and is reconnecting.

Sample collectd log output when mikrotik has been restarted:
Jul 10 14:47:58 collectd[31733]: routeros plugin: ros_interface failed: Protocol error
Jul 10 14:47:58 collectd[31733]: read-function of plugin `routeros/10.2.0.9' failed. Will suspend it for 20.000 seconds.
Jul 10 14:48:19 collectd[31733]: routeros plugin: ros_connect failed: No route to host
Jul 10 14:48:19 collectd[31733]: read-function of plugin `routeros/10.2.0.9' failed. Will suspend it for 40.000 seconds.
<successfull reconnect and gathering data continues...>

octo/librouteros,octo/librouteros