Refactor: libcrmcommon: make ACL creation checks more efficient
This does the simplest checks first, avoids doing the same check repeatedly,
and doesn't gather information unless needed.
Trace log messages are also improved, and the regression tests updated to
match.