HPCC-12326 Fix 4 memory leaks in ESP libs

(1) memory leak inside the createReferencedFileList() in
workunit dll;
(2) memory leak inside the gatherLibraryNames() in
workunit dll;
(3) memory leak inside deletePkgInfo() in WsPackageProcess;
(4) memory leak inside doGetFileDetails() in WsDFU.

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>