HPCC-12250 Allow pluggable interface to workunit creation

Initial work on splitting the workunit implementation so that Dali-specific code is isolated
having this on the same line as the } would have made it easier to read as a do while loop.