HPCC-9899 Ensure all FOR loops use local variables

FOR (x=y should be FOR(VAR x

Fixes HPCC-9899

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Merge pull request #4762 from GordonSmith/HPCC-9899

HPCC-9899 Ensure all FOR loops use local variables 

Reviewed-By: Miguel Vazquez <miguel.vazquez@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>