HPCC-12755 Rationalize secure workunit interface

Another step towards being able to provide plugin workunit functionality.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
secmgr could be NULL.  Should probably pass a pointer into checkWuScopeSecAccess and return immediately if NULL