Re-opening the FD on every poll is pretty expensive. So we should avoid
doing that as well re-use the read buffer (page-aligned, <=1 page) for
the sample data.
The lib/ directory was getting a bit out of hand, so this tries
to organize things a bit so it is easier going forward to locate
the code people want to patch.