HPCC-9523 - Fix potential hashdedup deadlock

If rehashing allocates, can cause memory callback to spill the
hash table involved and deadlock.
Be careful when allocating in a mutex.

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

HPCC-9523 - Fix potential hashdedup deadlock

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>