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
I could do that if we really wanted to, however, I went ahead and put it here since we're already modifying the response here.  I could move all of this logic to the server though if you have a strong preference.