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>
Ok, one of us is confused (and it may well be me). 

setValue() links the object being passed (so it owns it, but it does not "take over" ownership)

I think your fix is correct but the comment confused me - perhaps you can change it to 

// NOTE: setValue links its parameter

Also note there is similar code that should be fixed in ReferencedFileList::resolveSubFiles (I didn't find any other instances beside that)