(#4847) Add support for http_proxy environment variable for http requests

Previously we added support for using a HTTP proxy specific in puppet's
configuration file. This patch adds support for the environment variable
'http_proxy' as an override.

This also fixes the broken tests for proxy support and gets rake spec working
again as it should with rspec 2.7.x.
Merge pull request #10 from kbarber/ticket/4847-http_proxy

(#4847) Add support for http_proxy environment variable for http requests
Remove all the trailing whitespace
Remove unecessary requirement checking of thor

We already vendor thor, and if it's not present the text you get from
the LoadError is sufficient to know what's going on without rescuing and
supplying our own text.  In fact the default error message is better
since it includes a stack trace.
(#10438) Extract installed modules to the module path by default

The current behavior is to only allow the module to install to the
current working directory.  This makes the install destination
configurable both from inside your puppet.conf and from the command
line.

There were some concerns about the default being your module path.  Here
are those concerns and why it was decided to default to the modulepath
anyway.

Objections
* Installing directly to the module path in production may not be what
  you want.  However, just installing a module shouldn't do anything
  until you actually include it's classes in your manifests.
* The modulepath might have more than one directory in it.  We just use
  the first one.  This will require a PE change so it's modulepath is
  useful for this assumption.
* If you're want to download a module to develop it you don't want it in
  the module path.  I think if you want to develop a module you want to
  run it to test it also, and your modulepath will probably already be
  version controlled.

Pros
* One of the trickiest things for new users is installing modules to the
  right location, and this helps with that a lot.
* Experienced users can configure whatever they want easily from the
  command line.

There was some trickiness with getting the settings right from Puppet
since you have to mess with the run_mode global setting and reparse the
settings.  The code was already trying to use Puppet settings, but
wasn't dealing with the run_mode correctly, so now the settings that
were already defined should work too.
Factor out build_and_install_module

The specs were duplicating a lot of setup.  This helps a little.
Merge pull request #11 from mmrobins/ticket/master/10438

(#10438) Extract installed modules to the module path by default
(#10438) Add install_dir to the command line

The previous commit for #10438 to have a configurable install dir forgot
to put the command line option in.  This commit does that.

It also adds some code to the spec helper to prevent the specs from
interacting with puppet's actual vardir.  This was necessary to make the
test for the install_dir option workable, and it's just a good thing
besides.
Merge pull request #13 from mmrobins/ticket/master/10438

(#10438) Add install_dir to the command line
Fix URI paths to allow specs to pass when run from a dir with spaces

Jenkins tends to have spaces in the path into which it checks out repos, and that was causing failures:

    bad URI(is not URI?): file:///Users/matthewrobinson/work/puppet module tool/tmp/spec/myuser-mymodule-0.0.1.tar.gz

I'm really not sure why we're using URIs for file paths, but while we are we need to URI escape these paths, and then unescape them before using them.

Reviewed-by: Nick Lewis <nick@puppetlabs.com>
(#11151) Fix attempted connection to "none" HTTP proxy

Handle the default Puppet HTTP proxy hostname being the string "none".
Merge pull request #14 from domcleal/tickets/master/11151

(#11151) Fix attempted connection to "none" HTTP proxy
Add gitignore to default puppet module

Many people using this tool are checking files into git and are not good
at housekeeping.  Lots of modules have editor temp files stored in their
git repos.  This patch adds some magic that will rename files starting with
_ to dotfiles in the target directory.
Merge pull request #17 from zsprackett/master

Add gitignore to default puppet module
Update README per https://projects.puppetlabs.com/issues/11261
Merge pull request #18 from metcalfc/patch-1

Update README per https://projects.puppetlabs.com/issues/11261