Fixes #6828/BZ1104636: show correct version of puppet module.

The latest version of puppet modules was being incorrectly
calculated, based on an incorrect assumption that the last
item in the array was the latest version.  This commit
explicitly sorts the puppet modules by the version such that
the latest version is correct.

http://projects.theforeman.org/issues/6828
https://bugzilla.redhat.com/show_bug.cgi?id=1104636
If you're going the API route, can you maybe remove the `available_puppet_modules` action and just use `puppet_modules#index` instead? I think you could just add some filters like `not_in_content_view_id`, `name`, etc. along with your sort param.