Filter Wizard: only write IP address cache file on successful connect

Signed-off-by: Tim Harder <timothy.harder@analog.com>
Filter Wizard: always show RF bandwidth

Signed-off-by: Tim Harder <timothy.harder@analog.com>
Filter Wizard: simplify value2Hz/Hz2value calls

Specifically handles.freq_units should be kept up to date so we don't
have to perform a get call for the related widget value every time we
need it.

Signed-off-by: Tim Harder <timothy.harder@analog.com>
libiio: wrap loadlibrary call in try/catch block

The loadlibrary can fail due to various reasons. On Linux this includes
having a recent toolchain that supports newer C++ ABIs compared to the
libstdc++.so.* bundled in sys/os/glnxa64 with Matlab.

Since Matlab searches its own directories for bundled libs before the
system patchs it tries to use the older lib which lacks for support for
newer ABIs required by system libs that Matlab uses and doesn't bundle.
This causes errors similar to the following to be shown:

/opt/matlab/R2015a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6:
version `CXXABI_1.3.8' not found
(required by /usr/lib64/libicui18n.so.53)

The easiest fix is to override the libstdc++.so.6 symlink in
sys/os/glnxa64 to point to the system version instead of the bundled
Matlab version.

Catching the exception allows the user to take notice of it better and
provides better feedback to the app (in this case the filter wizard)
trying to load the library that things failed.

Signed-off-by: Tim Harder <timothy.harder@analog.com>
Filter Wizard: initial support for reading both Rx/Tx target clocks

Signed-off-by: Tim Harder <timothy.harder@analog.com>
Filter Wizard: force Rx/Tx redesigns on new filter design

Previously clicking on the new filter button would only force a single
Rx or Tx redesign before allowing save to ftr file or pushing to a
target.

Signed-off-by: Tim Harder <timothy.harder@analog.com>
Filter Wizard: simplify condition settings when advanced is enabled

Signed-off-by: Tim Harder <timothy.harder@analog.com>
libiio: only load library is it's not loaded already

This stops matlab from complaining about the library class already
existing after it's loaded previously.

Signed-off-by: Tim Harder <timothy.harder@analog.com>
Filter Wizard: minor variable usage simplification

Signed-off-by: Tim Harder <timothy.harder@analog.com>
Filter Wizard: try to fix advanced toggling and fcutoff settings

Filters saved with advanced mode enabled (with various extra settings
like fcutoff and phase equalization potentially different then
non-advanced filters) should be reloaded with advanced mode enabled.
Previously this was broken during some logic cleanup.

There still appears to be a bug where toggling the advanced settings
option for one of the preconfigured LTE filters changes the fcutoff
setting; however, this might have to do with manually calculating
different values than what the get_caldiv function returns.

Signed-off-by: Tim Harder <timothy.harder@analog.com>
Filter Wizard: change to new filter design if advanced is toggled

When advanced is toggled various settings such as fcutoff change so we
assume we're designing a new filter.

Signed-off-by: Tim Harder <timothy.harder@analog.com>