Refactoring ActiveRecord adaptor

Motivated by https://codeclimate.com/github/parndt/rails_admin/RailsAdmin::Adapters::ActiveRecord I started refactoring the ActiveRecord adapter.