Convert sources to lock format before comparing.

If the Gemfile sources lock to the same result as the current locked
sources, they haven't changed.

Closes #3298.
Merge pull request #3301 from TimMoore/issue-3298-unlocked-sources

Convert sources to lock format before comparing.