HPCC-11416 Report stack and memory report on exhausted heap

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
HPCC-11416 Make OOM reports conditional

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

HPCC-11416 Report stack and memory report on exhausted heap

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>