This code assumes that the thing is in column echelon form.
Document that and make sure we know that each time we use it!
When I wrote the last ditch routine for (minimalPresentation,Module), I didn't know it
Maybe we could add some quick checks, to ensure we don't hit the same row twice?

pivots Matrix := (p) -> (			    -- I wish this could be in the engine
     R := ring p;
     f := leadTerm matrix {{1_R},{1_R}};
     dir := if f_(0,0) == 1 then Down else Up;
     opt := Reverse => dir === Up;
     cols := entries transpose p;
     for j from 0 to #cols-1 list (
	  i := position(cols#j, e -> e != 0, opt);
	  if i === null then continue;
	  (i,j)))
