HPCC-9626 - Clear up various issues spotted by valgrind

various uninitialized and minor leak issues

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>