iiod: Replace condition variable with eventfd
iiod: Replace condition variable with eventfd

Currently the rw thread signals the completion of a operation (either open
buffer or read/write buffer) to the client executing the operation using a
pthreads condition variable. The problem with condition variables is that
it is only possible to wait for a single event. For proper robust operation
of the IIOD we need to consider other events as well, e.g. we want to abort
an operation if the client executing it has closed its communication
channel or if the IIOD got signaled that it should shutdown.

In preparation for adding support for these additional events change the
condition variable to a eventfd which will allow us to use poll() to wait
for any of many wakeup events to arrive.

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

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