on some platforms, std::abs may inadvertently pull in a math library. This patch replaces its use in the new loop collapse code with a no thrills in-situ implementation.
I have reworked the naming but am not seeing any other uses of std::abs in the runtime code. There are a couple of <cmath> references, but none of them appear to be reachable in the current build: one is apparently in a test case, the other - in the stats collection support which is off by default and where math use is heavier (e.g. sqrt) making its removal trickier.