Network backend: Add proper locking
Network backend: Add proper locking

This commit makes the network backend thread-safe: itallows multiple
threads to use the same IIO context. Not that it is a good idea though.

Signed-off-by: Paul Cercueil <73d292422978d45c9eeef455bb1b24a0db453722@analog.com>

sensarliar/libiio,sensarliar/libiio,analogdevicesinc/libiio,gburca/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,Sunderfield/libiio,sensarliar/libiio,Sunderfield/libiio,gburca/libiio,gburca/libiio,Sunderfield/libiio