posix.lua: tidy up pipeline and add pipeline_iterator and pipeline_slurp