IIOD: Remove harmful barriers to protect against double opening

The "opened" boolean was stored in a client-specific data structure
and was not linked with a specific device. As a result, it was not
possible to open two devices at once, while in theory nothing
prevents us against it.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Local backend: issue an error when reading an attribute returns EOF

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Local backend: Don't ignore missing buffer files when opening a device

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Update prototype of API function iio_device_open

It now accepts a second argument, which corresponds to the size
(in number of samples) of the kernel buffer that should be used.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Local backend: Update backend function local_open

It now also sets the kernel buffer size.

Additionally, if the samples count passed as parameter is 0, then
DDS mode is assumed: the buffer is not re-enabled after opening the
device, but will be re-enabled when closing it.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
IIOD: Update OPEN command to receive a third argument (samples count)

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Network backend: Update backend function network_open

It now has the updated prototype, and sends the samples count to
the server.

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