IIOD: Make VERSION return the version of libiio it was compiled with

Previously it would return the version of libiio it is currently using
at runtime, which may be different and newer.

If for instance a new version of the library introduce the foo()
function, returning the version of the library would trick the client
application into assuming that the IIO daemon supports the associated
"FOO" command, which is not true if the daemon was built from older
sources.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Fix detection of the \r at the end of commands

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Local backend: Add a way to read all of the device/channel attributes

By passing NULL as the "attr" argument to iio_device_attr_read or
iio_channel_attr_read, it is now possible to read all of the
attributes of a device or channel.

The buffer is filled with one block of data per attribute of the
device or channel, by the order they appear in the iio_device/iio_channel
structure.

The first four bytes of one block correspond to a 32-bit signed value in
network order. If negative, it corresponds to the errno code that were
returned when reading the attribute; if positive, it corresponds to the
length of the data read. In that case, the rest of the block contains
the data.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Allow the attribute name to be omitted in the READ command

In that case, all the attributes of the given device/channel will be
read.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Network backend: Allow the attribute name to be omitted

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