HPCC-9588 - Avoid holding onto lots of open files

XRef's 'Delete Empty Directories' causes all sub directories to
be collated, then themselves recursed, leaving each open and in
use. This commit, opens and recurses the sub directory then
ensures it's released(closed) before moving on.
This should greatly reduce the # of concurent open files this
process uses, which in environments with many sibling directories
and depth, was causing 1000's of open sockets and handles to
dafilesrv.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge pull request #4739 from jakesmith/hpcc-9588

HPCC-9588 - Avoid holding onto lots of open files

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>