datapath: Change listing flows to use an iterator concept.