Fix sorting of Rubygem#public_version

This is a rebase of PR#307, closes #700.
Order explicitly by versions.position
Merge pull request #703 from strzibny/fix-sorting

Fix sorting of Rubygem#public_version