refactor has_many.js

In reference to issue #2758 this is a refactor that follows the pattern set by ActiveAdmin.CheckboxToggler and a few other modules. It uses all the same code as the prior version just organized differently.