get ruby.exe path from Gem.ruby because bundler can change bindir
Lock when adding specs during Gem installation.

When installing Gems in a multi-threaded environment (e.g. Bundler) the
installer would try to run the following code:

    Gem::Specification.add_spec spec unless Gem::Specification.include? spec

This code is not thread-safe for two reasons:

1. Gem::Specification.add_spec modifies a global state
2. Gem::Specification.include? performs a read operation on a global state
   _while_ it might be modified

Working around this can be done in two ways:

1. Add locks to Gem::Specification where needed
2. Add locks in Gem::Installer where needed

The first option would require a lock around most class methods and possibly
other methods. As a result I've decided to, for now, go with option 2. Skimming
through the Installer class this appears to be the only place where a global
state is modified.

I've also removed the extra Gem::Specification.include? check in the installer.
The exact same procedure is also done in Gem::Specification.add_spec itself,
thus this is rather redundant.

The issue that led to this commit is #982 which contains more details about the
problem.
Gets rid of overly strict warning for versions below 1.0.0

Fixes #987
Alias readpartial to read to avoid method_missing

When Zlib::GzipReader reads from a TarEntry it tries #readpartial before
trying #read which results in a NoMethodError from method_missing.  Now
we save one method call as, for TarEntry, the two methods behave
identically.
Ignore dev dependencies when installing gems

There's no need to check these as the resolver has already determined
the correct gems to use.
Reparent dependency errors atop DependencyError

This allows common error types to be rescued together.  Part of #993.
Skip dependency errors when updating gems

Previously `gem update` would stop when it encountered a dependency
error while updating gems.  Now the dependency error is reported and
the gem is skipped.

Fixes #993.
Merge pull request #1006 from Elffers/overly_strict

Gets rid of overly strict warning for versions below 1.0.0
Add #987, #1006 to History
Merge pull request #1005 from YorickPeterse/master

Lock when adding specs during Gem installation.
Fix typo
Add #982, #1005 to History
Add whitespace
Use DependencyRequest#match?

We don't want to look at its insides, just use the methods it provides.
Track if a Set is allowed to match prereleases

This only adds the API.  Now a Set can match a prerelease version when
finding requirements.

Part of #990
Override dependency matching against prereleases

Now matching a dependency against a prerelease version of a gem can be
enabled with an optional, hidden third argument.
Propogate InstallerSet#prerelease= to #remote_set

The InstallerSet contains a set so it needs to pass the prerelease flag
down.

Maybe InstallerSet should be a ComposedSet?  It doesn't always use the
remote set, though, so maybe not.

Part of #990
Set prerelease acceptance from resolver

Now the resolver informs the various sets about if they should allow
prerelease dependencies or not.  This allows RubyGems to match past
behavior.

Part of #990
Pass prerelease option on from DependencyInstaller

This allows RubyGems to consider prerelease dependencies as it did for
prior releases.

Fixes #990
Add #990 to History