keys table has been renamed to castle_gates_keys
use subselect instead of join for with_access queries

it's faster and simpler
better comment for subselect_for_holder_and_gates

[ci skip]
Merge pull request #83 from Crabgrass/bugfix/4351-faster-directory-query

Bugfix/4351 faster directory query