local: Correctly handle timeout values of 0
local: Correctly handle timeout values of 0

With the current implementation the local backend treats timeout values of
0 as immediate timeout, while the expected behavior is indefinite timeout.

While we are at it also clamp the timeout to INT_MAX since that is the
maximum timeout value poll() can handle.

Signed-off-by: Lars-Peter Clausen <3318dc5ce3e4fb7c28a0b841b6801c884e1d0896@metafoo.de>

analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio