HPCC-12326 Fix 4 memory leaks in ESP libs

(1) memory leak inside the ReferencedFileList::
ensureFile() in workunit dll;
(2) memory leak inside the gatherLibraryNames() in
workunit dll;
(3) memory leak inside deletePkgInfo() in WsPackageProcess;
(4) memory leak inside CWsDfuEx::getFilePartsOnClusters().

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
This feels like you have fixed a leak but created a dangling pointer problem. @ghalliday  @afishbeck Please review