fix jQuery 1.9 compatibility issue

As per this discussion:
https://github.com/gregbell/active_admin/pull/1879#discussion_r3453478
cleanup

this is a general refactor, and doesn't change behaviour
Merge pull request #2016 from Daxter/refactor/js

JS Refactor
fixes regression from #2014

closes #2020
dynamic scope names

You can now pass in a proc as the first argument to a scope and
have that rendered on your index page.
Merge pull request #2018 from Daxter/feature/dynamic-scope-name

Dynamic scope names