Network backend: Fix network_write backend function

The IIO daemon responds to the WRITEBUF command with a negative error
code, or zero. Then, the client is supposed to send its data, and the
daemon eventually responds with a negative error code or the number of
bytes written.

However, the network backend was not reading the first code returned and
was directly sending the data. As a result, when trying to read the
second return value from the server, it was actually reading the first
one, which is 0 if no error occured, and the client application would
think that no bytes were sent.

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