netmap: pipes and poll are buggy, flush TX the hard way

This is the work of over two weeks and the efforts of
tobias@ and diego@ accumulated into a workable, but also
slow fix.  The code needs to be revisited again in January
to enable a batched flush on devices.