IIOD: Added code to handle program parameters

Now, the --help and --version (or -h and -V respectively)
parameters are recognized by the IIO daemon.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Added alternative (incompatible) debug interface

This interface shows a prompt, and real error messages instead of
error codes. It can be activated by passing the --debug (or -d)
parameter to the daemon.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Change prototype of function iio_create_xml_context_mem

It now requires the string length to be passed as parameter.
This prevents a call to strlen that may be not necesary, provided
the length is known by the caller.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Fix unhandled error

fwrite does not return a negative error code upon error, but zero.

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

The network context can be created with the API function
iio_create_network_context().

A string corresponding to the server's hostname is expected to be
passed as parameter.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
iio_info: Allow to use the network backend

By setting the environment variable LIBIIO_BACKEND to "network",
and by passing the hostname as argument, the iio_info test program
can now use the network backend.

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