Feature/sql permission checks

Reimplements permission checks in Arel/SQL which in turn improves extensibility and performance. Adds various performance improvements on other layers.
:thumbsup: for deprecating this. But deprecations should use the Deprecation logger :)

`ActiveSupport::Deprecation.warn <<-MESSAGE ...`