HPCC-8673 Fix memory leaks when running Get Roxie Metrics

Valgrind reported memory leaks when running EclWatch Get Roxie
Metrics. I found that the leaks happened inside roxiecommlib.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Merge pull request #3900 from wangkx/HPCC-8673

HPCC-8673 Fix memory leaks when running Get Roxie Metrics

Reviewed-By: Stuart Ort <stuart.ort@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>