rewrite lmr reduction code

no functional change, but opens a possibility of different reductions at
all/cut nodes