Add `ex` method combining best of %x and sh

This commit adds a new utility method, `ex`, which combines the behavior of
`%x{cmd}` and rake's `sh "cmd"`. `%x{cmd}` has the benefit of returning the
standard out of an executed command, enabling us to query the file system, e.g.
`contents = %x{ls}`. The drawback to `%x{cmd}` is that on failure of a command
(something returned non-zero) the return of `%x{cmd}` is just an empty string.
As such, we can't know if we succeeded.  Rake's `sh "cmd"`, on the other hand,
will raise a RuntimeError if a command does not return 0, but doesn't return
any of the stdout from the command - only true or false depending on its
success or failure. With `ex(cmd)` we purport to both return the results of the
command execution (ala `%x{cmd}`) while also raising an exception if a command
does not succeed (ala `sh "cmd"`).
Merge pull request #240 from haus/maint_add_ex

Add `ex` method combining best of %x and sh
Initial work on reorg into classes
Bring in changes to tar and util
Move under packaging
Correct load path modification in packaging.rb
Add version utils
Continue with params
Initial attempt at setting a PROJECT_ROOT
Config is a class, and Params is its own module
Initial support for loading from build defaults

Rename various methods for sanity
Try to break down into smaller methods, for readability
Define default configs in config.rb, because its better than other places
Enable loading defaults from default configs, so we have a way to get data
Add support for loading from envvars
Add util to cd somewhere and do stuff
Initial breakout of tools
Go to project root to use git
Remove get_release method
Improve comments in packaging/config.rb

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Make :string default for envvars

remove explicit :type => :string from packaging/config.rb, it is default now

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Add erb methods, get_binding to Pkg::Config

Currently all the old @build instance variables are set as essentially global
rake application instance variables in order to allow our erb templates to
reference them without qualification. This is dumb. In the new world, we'll
take an optional binding when ERBing, as added in the commit. This commit also
adds a new Pkg::Config.get_binding method to get the class variables of
Pkg::Config, which is what we'll pass to the templates.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Modify tar.rake to use library

This commit removes all the logic for making a tarball from tar.rake and uses
the new tar object in lib/tar.rb. It depends on changes to the way templates
are done. With the new templating erb_file method, if no outfile is supplied
one is generated off the assumption the outfile is the infile without '.erb'.
the new erbfile method also has an option to remove the original file. All of
these combined clean up our tar task quite a bit.

Update erb_file method for betterness

This commit updates the erb_file method to make the outfile optional, assuming
the outfile is the infile sub '.erb' if no outfile is supplied. It also adds an
option to remove the original file if desired.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>