Local backend: Fix extended name not handled in scan-element attrs
Local backend: Fix extended name not handled in scan-element attrs

Since the scan-element attributes are now hidden, they wouldn't get added
to the iio_channel's list of attributes, and as such didn't take part in
the extended name calculation.

Worse, the current code would fail when the scan-element attributes had
an extended name in their filename.

This commit changes this behaviour, so that the scan-element attributes
are first added in a separate list of attributes (in iio_channel_pdata).
The set_channel_name() function will then use the two lists of
attributes for the extended name calculation. Finally, this list is
freed as it doesn't have any use after the scan-element attributes are
parsed correctly.

This fixes a bug introduced by 9d77ca0.
Fixes #73.

Signed-off-by: Paul Cercueil <73d292422978d45c9eeef455bb1b24a0db453722@analog.com>

analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio,analogdevicesinc/libiio