Let the plugins save/restore their data to/from the INI file

This is an experimental change aimed at providing a faster loading of
the plugins and the multiosc, when using the network backend of libiio.

Each plugin receives a filename as argument to their init() function,
where they can restore their state from. They also receive a filename as
argument to their destroy() function, so that they can save their state
if they need to.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Import of new libini library

This LGPL library is a simple library to read configuration files.

https://github.com/pcercuei/libini

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Added a new implementation of INI loading code

It uses my own INI parser, available (under LGPL) at
https://github.com/pcercuei/libini

This new implementation has been designed to be very fast when used with
the network backend of libiio.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/fmcomms1: Save/restore state using the new INI functions

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/fmcomms2: Save/restore state using the new INI functions

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/fmcomms2_adv: Save/restore state using the new INI functions

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/fmcomms2: Update widgets before connecting signals

Otherwise, the signals get triggered while the widgets are updated.
This change makes the FMComms2 plugin load between 2x and 3x faster.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins: Create the IIO context in the init() function, not identify()

By moving the context creation to the init() function, we can create the
IIO contexes in parallel once the available plugins have been
identified (and once the plugins are created in a thread).

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Make all plugins initialize in threads

This considerably reduces the time needed to start the application,
when the network backend of libiio is used.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/daq2: Update to use new INI functions

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins: Fix some warnings

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/fmcomms2: Save/restore plugin-specific data to/from INI

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/daq2: Save/restore plugin-specific data to/from INI

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/fmcomms1: Save/restore plugin-specific data to/from INI

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/fmcomms2_adv: Save/restore plugin-specific data to/from INI

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins: Add save_profile / load_profile callbacks

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Osc: Changes to use the new INI functions

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Remove all references to the old INI code entirely

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
plugins/fmcomms2_adv: Speed up loading by reading all attributes at once

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
iio_widget: Add util function iio_update_widgets_of_device

This function can be used by the plugins to update all the widgets
related to one device. This function is optimized to speed up the
update of the widgets when the network backend of libiio is used.

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