Simplify the test case for deployment with source.
Normalize sources to lock format when comparing.

Fixes #3167.

Also moves the reversing of Rubygems remotes for the lock file out of
SourceList#combine_rubygems_sources and into Rubygems#to_lock.