Use install_dir to find git gem checkouts

Previously when a new git source was created from a lockfile the source
would use the default gem install dir even when an alternate was
specified.  This would result in RubyGems being unable to find the
source directory for the gems.
Do not write empty lockfiles upon error

Because Lockfile#to_s occurred inside the opened file in Lockfile#write
if an error was raised the file would be truncated.  Now the content is
created before opening the file which means an exception won't truncate
the file.
Update History for @35c134b, @8a603fc
Test ConnectionPools#no_proxy?

Part of #997
Clean up no_proxy? formatting
Match no_proxy wildcards correctly.

A wildcard no_proxy entry (with a leading dot) must match a domain
without the leading dot, but RubyGems did not support this.  Now
RubyGems strips the dot to check for a match.

Fixes #997
Refactor early-exit to use Enumerable#any?
Add #1004 to History
Add #1003 to History
Add #989 to History
Fix unused variable warning