fix(access): get_access_array() works correctly when logged out

When logged out, but given a user GUID, get_access_array used to not
return ACL memberships, friend collection ACLs, and the ACCESS_PRIVATE
value if the user was an admin. This fixes this problem, particularly
helping has_access_to_entity() in building an accurate query.
fix(access): has_access_to_entity() now respects ACLs also when set to be ignored

This function relies on a nested stack of functions which all depend
on the global "ignore access" state. This pragmatic workaround ensures
the access system is always enabled while all these functions are called.

Fixes #7159
chore(docs): test stubs for read permission queries when ACLs are being ignored

Refs #7159
Merge pull request #7172 from juho-jaakkola/7159

Fixes has_access_to_entity() and get_access_array()