HPCC-9215 DALI should not check LDAP for non managed scopes

Currently dali makes time consuming calls to LDAP to check the permissions
for every single file, even when that file not within a managed scope.
This was causing dali to delay workunits that used to run in seconds,
to over an hour or more. Additionally, DALI would call out to LDAP to check
a scope, even if that scope was a child of a scope with known permissions.

This fix corrects behavior in two ways.
First, checks if the scope is managed (if it was added to the ESP "FileScopes"
permissions), and if not, assign the default LDAP permission without a call
to LDAP.
Second, if it is part of a managed scope (exact match or a child of another
managed scope) then returns the cached permissions of the closest parent
scope, with an early exit in case of a DENY permission. If the scope is not
in the cache, a call to LDAP is made and the results are added to the cache
for subsequent calls.

Signed-off-by: William Whitehead <william.whitehead@lexisnexis.com>