HPCC-11418 Roxie may stall for long periods under load

Switch spinlock finto criticalSection (will refactor further in 5.0 or later)

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #5864 from richardkchapman/jhtree-spinlock

HPCC-11418 Roxie may stall for long periods under load

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>