Make shure the faster topo_sort function is used where appropriate
When the calling code is iterating through the whole list, it is faster to use
topo_sort instead of TopoSorter.iter_topo_order.
Also update a blackbox test case to reflect the new ordering.