add logic to bail out of a pass that has not made progress for a
long time

tweak a couple of peephole passes