Install into --install-dir including dependencies

This is another attempt to fix https://github.com/rubygems/rubygems/pull/442 . So gems should be installable into --install-dir with dependencies just fine even without modifications of Specification.dirs, since the change in it makes inaccessible gems already present on the system. The test suite now passes also the 86826aa.

Please note that this includes commit from pull request https://github.com/rubygems/rubygems/pull/451 as well.