Add a `puppet storeconfigs export` command to dump the database

This command can be used to export a copy of the ActiveRecord
storeconfigs database (only exported resources, and only nodes with
exported resources) which can be imported into PuppetDB.  This is useful
when migrating from old-school storeconfigs to PuppetDB, as it allows
agents to run without losing any of their exported resources for a time.
Once every agent has run once, the database should be up-to-date in any
case.
Don't export catalog environment

This isn't actually a legal key on the catalog, so exclude it.
Write the storeconfigs database dump as a .tar.gz

Previously this was a single file containing many JSON objects, for the
catalogs. Now it's a .tar.gz (or .tar if gzip can't be found [or
directory if tar can't be found]) containing one file per node. The
tarball also includes a metadata file specifying the nodes which are
present, the timestamp of the export, and the version of the "replace
catalog" command which ought to be used to submit the catalogs to
PuppetDB.
Add a pending acceptance test for storeconfigs export

This test can't be finished until the import functionality for PuppetDB
proper is complete, but it seems better to have this start than nothing.
Docs: Add authenticated curl example to tutorial.markdown and link to curl.markdown for more details
Merge pull request #445 from nfagerlund/tutorial_link_adjustment

Docs: Add authenticated curl example to tutorial.markdown and link to cu...
Add utils for capturing log output during testing

This commit adds a namespace for logging-related test utility
functions.  Therein, it addsmacro and a couple of functions.
The macro, `with-log-output`, simplifies the process
of temporarily redirecting and capturing logging output during
tests.  The utility function `logs-matching`
provides a means for searching through the captured logs for log
entries whose log messages match a specified regular expression
pattern.
Generalize and improve our utility function for parsing CLI args

At some point in time the clojure CLI library that we use to parse
stopped supporting a flag to indicate 'required' arguments.  Thus,
we were getting much farther into the code than we should have been
if you left off, e.g., the `--config` option to the `services`
program.  This also resulted in useless, unintuitive error messages.

Additionally, the function that we were providing in `utils` to
generalize our CLI argument handling for other PuppetDB command-line
tools included more arguments than would be applicable to some
tools.

This commit makes the `cli!` more general, and moves the app-specific
options back into the apps themselves.  It also adds support for
checking for `required` arguments and fails with a reasonable error
message if you are missing any.
Merge pull request #394 from cprice-puppet/feature/master/logging-test-utils

Add utils for capturing log output during testing
Merge pull request #433 from cprice-puppet/maint/master/generalize-cli-validation

Generalize and improve our utility function for parsing CLI args
Conform to the PuppetDB export format
[packaging] Remove stray # in install.rake

install.rake has two lines with '#' in them that appears to be left over from a
variable -> hard path change. This commit removes them so the directory strings
are constructed correctly.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(maint) Ignore ext/packaging

This commit adds ext/packaging to the .gitignore for puppetdb and also excludes
it during tarball creation in the tar rake task.
(maint) Copy filesystem utility methods from packaging tasks

As the install task uses cp_p, cp_pr and ln_sfT, this commit copies them back
into the top level Rakefile for use during build, as the external packaging
tasks will not be available at that time.
Merge pull request #448 from MosesMendoza/maint/master/packaging_fixups

[packaging] Remove stray # in install.rake
Merge pull request #447 from haus/fix_package_building

Fix package building
Document the `puppet storeconfigs export` command

This also forms the beginnings of a migration guide.
Add PE_VER to variables exported for deb package builds

Because we need this in the packaging repo rake tasks for determing ship
targets and dependency resolution.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #449 from MosesMendoza/maint/master/export_pe_ver

Add PE_VER to variables exported for deb package builds
Merge pull request #438 from nicklewis/storeconfigs-migration

Add a `puppet storeconfigs export` command to dump the database