Check for forbidden access in queries

Uses GETACCESSLEVEL() of (currently) development branch of Sqlite plugin.

- reformat some sql
- added acl checks