IIOD: Properly handle a socket being disconnected by the client

Previously, the client thread was not stopped when the socket was
closed. Worse, the interpreter would ignore the error on the socket and
keep running, eating as much CPU as possible in the process.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Configure sockets to timeout if the connection drops

The sockets opened with the clients are now configured to send
keep-alive packets every 10 seconds, and close the connection if the
client didn't reply for one minute.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>