Partial fixes for RubyGems 2.0

With the exception of @a98efe3 these move bundler one step closer to RubyGems 2.0 compatibility.  See also tenderlove/bundler#1 for the failures I saw with these commits.


(edited to add failures:
```
Finished in 6 minutes 34.49 seconds
732 examples, 32 failures, 1 pending

Failed examples:

rspec ./spec/install/gems/dependency_api_spec.rb:6 # gemcutter's dependency API should use the API
rspec ./spec/install/gems/dependency_api_spec.rb:17 # gemcutter's dependency API should URI encode gem names
rspec ./spec/install/gems/dependency_api_spec.rb:27 # gemcutter's dependency API should handle nested dependencies
rspec ./spec/install/gems/dependency_api_spec.rb:44 # gemcutter's dependency API should handle multiple gem dependencies on the same gem
rspec ./spec/install/gems/dependency_api_spec.rb:54 # gemcutter's dependency API should use the endpoint when using --deployment
rspec ./spec/install/gems/dependency_api_spec.rb:66 # gemcutter's dependency API handles git dependencies that are in rubygems
rspec ./spec/install/gems/dependency_api_spec.rb:84 # gemcutter's dependency API handles git dependencies that are in rubygems using --deployment
rspec ./spec/install/gems/dependency_api_spec.rb:115 # gemcutter's dependency API falls back when hitting the Gemcutter Dependency Limit
rspec ./spec/install/gems/dependency_api_spec.rb:140 # gemcutter's dependency API falls back when Gemcutter API doesn't return proper Marshal format
rspec ./spec/install/gems/dependency_api_spec.rb:151 # gemcutter's dependency API timeouts when Bundler::Fetcher redirects too much
rspec ./spec/install/gems/dependency_api_spec.rb:185 # gemcutter's dependency API fetches again when more dependencies are found in subsequent sources
rspec ./spec/install/gems/dependency_api_spec.rb:203 # gemcutter's dependency API prints API output properly with back deps
rspec ./spec/install/gems/dependency_api_spec.rb:226 # gemcutter's dependency API does not fetch every specs if the index of gems is large when doing back deps
rspec ./spec/install/gems/dependency_api_spec.rb:250 # gemcutter's dependency API uses the endpoint if all sources support it
rspec ./spec/install/gems/dependency_api_spec.rb:261 # gemcutter's dependency API fetches again when more dependencies are found in subsequent sources using --deployment
rspec ./spec/install/gems/dependency_api_spec.rb:304 # gemcutter's dependency API installs the binstubs
rspec ./spec/install/gems/dependency_api_spec.rb:316 # gemcutter's dependency API installs the bins when using --path and uses autoclean
rspec ./spec/install/gems/dependency_api_spec.rb:327 # gemcutter's dependency API installs the bins when using --path and uses bundle clean
rspec ./spec/install/gems/dependency_api_spec.rb:338 # gemcutter's dependency API prints post_install_messages
rspec ./spec/install/gems/dependency_api_spec.rb:348 # gemcutter's dependency API should display the post install message for a dependency
rspec ./spec/install/gems/dependency_api_spec.rb:162 # gemcutter's dependency API when --full-index is specified should use the modern index for install
rspec ./spec/install/gems/dependency_api_spec.rb:173 # gemcutter's dependency API when --full-index is specified should use the modern index for update
rspec ./spec/install/gems/dependency_api_spec.rb:370 # gemcutter's dependency API when using basic authentication passes basic authentication details and strips out creds
rspec ./spec/install/gems/dependency_api_spec.rb:381 # gemcutter's dependency API when using basic authentication strips http basic authentication creds for modern index
rspec ./spec/install/gems/simple_case_spec.rb:304 # bundle install with gem sources the simple case gracefully handles error when rubygems server is unavailable
rspec ./spec/install/gems/simple_case_spec.rb:392 # bundle install with gem sources when prerelease gems are not available still works
rspec ./spec/install/gems/standalone_spec.rb:188 # bundle install --standalone with gemcutter's dependency API simple gems should run without errors
rspec ./spec/install/gems/standalone_spec.rb:194 # bundle install --standalone with gemcutter's dependency API simple gems still makes the gems available to normal bundler
rspec ./spec/install/gems/standalone_spec.rb:200 # bundle install --standalone with gemcutter's dependency API simple gems generates a bundle/bundler/setup.rb
rspec ./spec/install/gems/standalone_spec.rb:206 # bundle install --standalone with gemcutter's dependency API simple gems makes the gems available without bundler
rspec ./spec/install/gems/standalone_spec.rb:220 # bundle install --standalone with gemcutter's dependency API simple gems works on a different system
rspec ./spec/other/help_spec.rb:28 # bundle help simply outputs the txt file when there is no groff on the path
```
— @indirect)