Refactor iio_utils to aid testing

- Allow a custom directory path to be scanned for sensors;
- Allow a custom filtering of the sensors via a callback

These changes make it feasible to test iio_utils against a mock sensor
storage instead of a live running system

Bug: 158844592
Test: flash, observe sensors
Change-Id: Ifac9fb2537dc1839d6088c3f24e7960d229fb2b2
3 files changed