Auto merge of #1454 - rubygems:seg-compact-index-versions-file, r=indirect
Auto merge of #1454 - rubygems:seg-compact-index-versions-file, r=indirect

Ensure that the correct info checksum is used when creating a new versions file

~~This also depends upon https://github.com/bundler/compact_index/pull/20~~

We need to account for the fact that the latest version for a gem could be yanked (or could also not be the lexically last version).
This PR ensures that the new versions file is created with all versions for a gem on the same line, which I believe https://github.com/rubygems/rubygems.org/pull/1453 broke.
It also gets rid of duplicated logic used for fetching the versions, replacing it with logic that de-deuplicates the `CompactIndex::Gem` object and handles yanked versions

algolia/rubygems.org,spk/rubygems.org,JuanitoFatas/rubygems.org,kbrock/rubygems.org,rubygems/rubygems.org,JuanitoFatas/rubygems.org,spk/rubygems.org,algolia/rubygems.org,kbrock/rubygems.org,spk/rubygems.org,sonalkr132/rubygems.org,algolia/rubygems.org,algolia/rubygems.org,rubygems/rubygems.org,kbrock/rubygems.org,sonalkr132/rubygems.org,spk/rubygems.org,rubygems/rubygems.org,rubygems/rubygems.org,sonalkr132/rubygems.org,JuanitoFatas/rubygems.org,sonalkr132/rubygems.org,kbrock/rubygems.org,JuanitoFatas/rubygems.org