Create a helper object to wrap polling on multiple file descriptors

This helper API can be used to reliably poll on a dynamically increasing
set of file descriptors, and it provides a functional callback on top
of the C poll() API. As is, it only supports POLLIN as that is what
the Sensor API needs, but more event types can be added

Bug: 158763319
Test: atest --host android.hardware.sensors@2.0-Google-IIO-Subhal_test-MultiPoll
Change-Id: Ifabd1d06b595e93bfaf8e0ffab7b783fbcc73b40
4 files changed