Fix the query commands when listing remote gems

In @2751c21 #simple_exceute (renamed to #show_gems in a later commit)
was extracted from #execute but the method was not changed to check the
name variable instead of the options.

This was missed on review, and tests were lacking to cover this case.
Make the gem build complete file a regular file

Due to Fedora policy, it is easier on them to use a regular file instead
of a hidden file to maker build completion.

Fixes #682
Test UpdateCommand#fetch_remote_gems

This method is untested, but will need to change for #688
Allow a SourceFetchProblem to be raised

Ruby uses #exception to convert an object into an Exception subclass
suitable for raising.  This aliases #error to #exception so we can type
less when re-raising after such a problem.
Re-raise exceptions when looking for latest gems

In the update command RubyGems was ignoring exceptions raised when
determining the latest version.

This meant that `gem update --system` from a rubygems with invalid
certificates would incorrectly report "nothing to update".

Now, if an error is raised and captured, the update command will
re-raise the exception which gives useful feedback to the user.

Fixes #688
Fix unused variable warnings
Autodetect gem dependencies file

Previously you would have to specify `gem install -g Gemfile`.  This is
confusing and tedious for the user.

Now RubyGems prefers gem.deps.rb over Gemfile over Isolate.
Simplify @936b2c4

I can let Array#find do the work of picking the file name, no need for
internal assignment or check.
Ignore failure of "clean" when building extensions

Some extensions do not have a clean task, even though they go through
the extconf.rb builder.  Ignore failure of the clean task for these
gems.
Revert "Do not clean for cmake"

This commit is no longer needed after @184e257 as a failing clean task
is ignored.

This reverts commit 010ae97b5cb0d170cce74e4abe77699bb209492c.
Fix circular require warning in tests
Use existing constant of gem dep files

I did not know this constant existed, go @evan!
Do not require 'rubygems' from 'rubygems/ext'

RubyGems checks all gems for requirable files it can load matching the
given name.  If a gem requires extension building RubyGems could enter a
state where Gem::Ext was not yet loaded (because rubygems/ext was
partially loaded) which would result in a missing constant exception.

Now RubyGems assumes that module Gem exists when rubygems/ext is loaded.
This avoids the problem of a missing Gem::Ext and allows checking for
requirable files to proceed properly.

Bug discovered by Koichi Sasada.
Document Gem::RequestSet initialization
Remove extra requires in rubygems/ext

There's no need to require rubygems/ext/builder from or rubygems/command
from these files.  The necessary code has already been loaded from
rubygems/ext.
Disallow gem activation while building extensions

RubyGems needs to require files in $LOAD_PATH to build an extension
while it is determining which gems to load.  This is not possible if
there are unresolved dependencies as rubygems will attempt to load those
dependencies which need to build extensions, which creates an infinite
loop (that is fortunately stopped by the CHDIR_MUTEX while building
extensions.

Now RubyGems temporarily clears Gem::Specification.unresolved_deps while
it requires the necessary files, then restores it after the extension is
built.  This is OK to do as the RUBYGEMS_ACTIVATION_MONITOR is held in
the overridden Kernel#require.
Require Gem::Command* for tests

This is needed in various places after removing the unneeded requires
from lib/rubygems/ext*.
Do not attempt to build extensions when none exist

RubyGems only checked for extensions before attempting to build via
StubSpecification, but this check is inadequate.  Now the check exists
in both methods as the activation code may call build_extensions on a
real extension.
A test for Gem::RequestSet::DepedencyAPI
Fix name typo for GemDependencyAPI