removed useless assignment variables
backport r48265 without to using refinements
stubs are already sorted, so we don't have to resort

The stub specifications and the regular specifications are sorted in the
same way.  Since the list of full specifications is based on the list of
already sorted stub specifications, there is no need to sort the full
specs.
Merge pull request #1061 from rubygems/backport-r48265

backport r48265 without to using refinements
Merge pull request #1035 from hsbt/remove-useless-variables

Removed useless assignment variables
Merge pull request #1063 from tenderlove/resort

stubs are already sorted, so we don't have to resort
fix warning in stub specifications

if the name and version methods haven't been called, the instance
variables will not be initialized, and calling to_spec will warn. This
ensures that the data has actually been loaded before looping through
the loaded specs.