improve querying pages table
improve querying pages table

- correctly handle indirectly invisible pages
- improve performance for simple queries
- improve performance for quering home

nsams/koala-framework,koala-framework/koala-framework,nsams/koala-framework,yacon/koala-framework,yacon/koala-framework,nsams/koala-framework,Ben-Ho/koala-framework,darimpulso/koala-framework,Sogl/koala-framework,yacon/koala-framework,kaufmo/koala-framework,darimpulso/koala-framework,Ben-Ho/koala-framework,Sogl/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework