HPCC-9099 Fix a few leaks in exception handling code

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>