HPCC-11777 Fix CLocalEnvironment cache thread safeness

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge pull request #6125 from jakesmith/hpcc-11777

HPCC-11777 Fix CLocalEnvironment cache thread safeness

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>