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
Fix sorting of menu items whose labels are procs

Commit 452956eccf77ea368b05902a3d0d8020152a7aaa introduced
a bug in `MenuItem#<=>`: if the label was a proc, it would
not compare `label.call <=> other.label.call`, but instead
`label.to_s <=> other.label.to_s`, and `Proc#to_s` returns
some irrelevant metadata about the Proc object.