Introduce command 'puppetdb' as a sub-command dispatcher

This patch includes a new base tool named 'puppetdb' thats job for now is
to accept sub-commands and arguments and execute their equivalent
puppetdb-<sub-command> command (if it exists).

This modifies all documentation to use the new syntax, and all acceptance
tests as well.

Signed-off-by: Ken Barber <ken@bob.sh>
Move sub-commands to libexec dir out of path

This aligns the behaviour with git, so that sub-commands belong in their own
libexec dir outside of the normal PATH of execution.

Legacy commands are left in their original path locations, but replaced with
a wrapper script that returns a warning and executes the new sub-command for
the user. This provides us with a way to eventually remove these command
place-holders when we are ready to remove the legacy hyphenated subcommands.

Signed-off-by: Ken Barber <ken@bob.sh>
Include legacy sub-command acceptance test

This patch provides a test to ensure legacy sub-commands are still working and
returning sufficient deprecation warnings.

Signed-off-by: Ken Barber <ken@bob.sh>
Test to ensure the puppetdb command list all existing sub-commands

When running `puppetdb` on its own, it should list all available sub-commands
in its libexecdir. This test ensures that happens.

Signed-off-by: Ken Barber <ken@bob.sh>
Change regex for legacy subcommand warning test

Signed-off-by: Ken Barber <ken@bob.sh>
Improvements to puppetdb and legacy handling

* Reduce execution of external commands in shell scripts
* Use /usr/libexec for suse, darwin and bsd also
* Make rake install task more DRY for puppetdb-legacy and sub-command copying

Signed-off-by: Ken Barber <ken@bob.sh>
Test on file presence, not execution

The error message if the file is not executable later on is already quite good
and trying to test all files beforehand is cumbersome.

Signed-off-by: Ken Barber <ken@bob.sh>
Rebase from master, fixing other non-sub commands

Signed-off-by: Ken Barber <ken@bob.sh>
Fix packaging to include sub-command dir for debian derivatives

Previously I hadn't included libexec_dir in the packaging, since we now ship
the sub-commands in this directory all sub-command based commands were failing
(especially puppetdb ssl-setup).

This also corrects a couple of documentation changes that were missed.

Signed-off-by: Ken Barber <ken@bob.sh>
Fix other legacy uses of puppetdb-ssl-setup to use the sub-command

While the old command still works, we should be eventually deprecating it so
this patch removes many more cases of its usage.

This also will remove any warnings from package installation.

Signed-off-by: Ken Barber <ken@bob.sh>
Fix the libexec syntax in base.install and remove backquotes from echo

Without these two things:

* The template parsing returns a syntax error
* echo will try to run puppetdb ssl-setup which is bad

Respectively.

Signed-off-by: Ken Barber <ken@bob.sh>