Support processing of gems that have already been loaded into an IO object.

In particular, this feature is used by rubygems.org to extract metadata
from uploaded gems that have not yet been written to storage.
Use file locks to ensure safety when being installed in a parallel environment
Remove duplicated setup of spec.load_path

load_path is set already by Gem::Specification.load
Fix Gem::Source::Git example.
Cleanup @gem_dir in class which declares it.
Allow to override default extension_dir using operating_system.rb

This follows the same logic as gem_dir overrides, although
default_ext_dir_for requires base_dir parameter. This allows to install
gems for example into /usr/share, but their extensions into /usr/lib64.
Merge pull request #743 from voxik/cleanup-gem_dir-in-correct-class

Cleanup @gem_dir in class which declares it.
Merge pull request #742 from voxik/fix-gem-source-git-example

Fix Gem::Source::Git example.
Merge pull request #741 from voxik/remove-duplicate-setup-of-spec.loaded_from

Remove duplicated setup of spec.load_path
Merge pull request #737 from Who828/master

Use file locks to ensure safety when being installed in a parallel
Add #737 to History
Merge pull request #740 from nobu/io-console

Use io/console on prior to 1.9.3 if it is aviable
Fix test bug after #740
Order requires in Gem::TestCase
Add #740 to History
Fix Gem::DefaultUserInteraction documentation

This was accidentally broken by @68da16d
Sort autoloads
Reduce Gem.use_gemdeps overhead via autoload

This prevents unused files from being loaded while we are starting up
Remove unneeded require io/console

The real problem was resolved by @14b784a which used autoload instead of
require.
Merge pull request #744 from voxik/extensions_dir-override

Allow to override default extension_dir using operating_system.rb