Bring editions filter script inline with style guide
Clean up attachable in attachments controller

- Access it via lazy loading #attachable method, exposed to the view as
  a helper method, rather than a find_attachable before filter.
- Find the attachable class from the params rather than using a case
  statement. This cleans up the controller and should make it simpler to
  reuse it for future attachables.
Remove unnecessary assignment in view
Clean up attachments controller attachment method

The views already use the attachment helper method, so this just cleans
up the controller by removing the before filter and making it clearer
that the attachment can be found or built, depending on params.
Tidy edition perm checks in attachments controller

Ideally the permissions system would be able to handle objects other
than editions so that can?(:see, attachable) would work for any type of
attachable. Given that it doesn't, and fixing the permissions system is
a bigger job, this tidies up the before filters so we only have a single
one related to edition checks instead of four.
Consolidate admin editions filter into single form
Add 'admin filters docs with javascript' feature
Admin editions filter uses xhr to update results

• Re-writes javascripts/admin/view/editions/index.js do update results over xhr
• Moves search results view into own partial and modifies controller to respond to
xhr requests with that partial.
Added a js proxifier, editions filter uses it

proxifier.js is the important part of this commit.  It's a work
around for the need to endlessly proxy functions when using the
constructor / prototype pattern. See changes to STYLEGUIDE.md for
more details.
Remove Edition.in_ministerial_roles scope

The scope was only used in the ministerial roles controller where we
already had a MinisterialRole object which has an association for
policies.
Filter doesn't do duplicate requests
Proxifier.proxifyAllMethods is a little less silly
Merge pull request #1171 from alphagov/attachment-controller-polymorphism

Tidy up admin attachments controller
Merge pull request #1174 from alphagov/remove-in-ministerial-roles-scope

Remove Edition.in_ministerial_roles scope
Merge pull request #1169 from alphagov/improve-admin-editions-filter

Improve admin editions filter

[Delivers https://www.pivotaltracker.com/story/show/61476834]