Foreach loop variable fix per #198

loop.index0 and loop.revindex0 are now 0-index while loop.index and loop.revindex are 1-index. Exact match with Twig. Obviously the backward-incompatible nature of the fix precludes us from pushing it until 4.0.0