Invalid namespaces for tests http/nodes|fact_names masking failures

The test files http/fact_names.clj and nodes.clj had incorrect namespace
declarations that were overridden in other files. This caused these tests
to be skipped and in fact mask a couple of failures.

Luckily these were testing failures only, once fixed this is all passing
again.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #829 from kbarber/maint/1.6.x/invalid-test-namespaces

Invalid namespaces for tests http/nodes|fact_names masking failures
(PDB-425) Move daemon-reload out of install-only

On upgrades, systemd service files may not have already been present, and they
might have changed. To address this, this commit moves the daemon-reload call
to systemctl out of the install only section of the %post, so that it is always
invoked. This will register the systemd service on upgrade from a sysv service
(as happens on fedora 18 through fedora 20) as well as register any changes to
the service file.
(PDB-425) Try SysV and SystemD on upgrades

On upgrades from PuppetDB < 1.6.0, even on platforms that support systemd, only
sysv will be in place. This means that when the status is queried in the %pre,
there won't be a systemd service file yet, so puppetdb will appear to not be
running even if it is. Next, when the service is stopped, also in the pre,
again there will be no systemd service to stop, even if there is a sysv service
running. This commit addresses that by testing for the existence of the systemd
service file, and if that is present, use the systemd service calls. Otherwise
it calls out to the sysv init system.
Merge pull request #833 from haus/ticket/1.6.x/pdb_425_fix_systemd_upgrades

SystemD upgrade improvements
(packaging) correct path to libexec files for PE

Prior to this commit, when we installed to the libexec dir when building PE, we
installed to /opt/puppet/libexec/puppetdb. However, the %{name} macro in the
redhat spec will evaluate to pe-puppetdb. This means the %files section looked
for files that don't exist. This commit updates the spec file to use the
  correct %{realname} macro, e.g. 'puppetdb', which is the correct path.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Merge pull request #836 from MosesMendoza/packaging/1.6.x/fix_pathing_libexec

(packaging) correct path to libexec files for PE
(PDB-238) - Remove v1 API - part 1

This commit starts some refactoring to the existing PuppetDB HTTP API to make
removing v1 portions of the API easier. This is being broken into two commits
as the 1.6.x branch will benefit from the refactor and master can build on this
and actually remove the v1 stuff (along with the docs etc). This commit contains:

- Moving v1 functions used by v2/v3 to api.clj
- Having v2/v3 call into api.clj from their routes
- Move former v1 tests into test/api.clj
- Changed the v1 tests to use the functions themselves (not going in through the top *app*)
- Add tests for the same api calls going through both v2 and v3 routes

Conflicts:
	src/com/puppetlabs/puppetdb/query.clj
	src/com/puppetlabs/puppetdb/query/nodes.clj
	test/com/puppetlabs/puppetdb/test/http/v1/command.clj
	test/com/puppetlabs/puppetdb/test/http/v1/deprecation.clj
	test/com/puppetlabs/puppetdb/test/http/v1/facts.clj
	test/com/puppetlabs/puppetdb/test/http/v1/metrics.clj
	test/com/puppetlabs/puppetdb/test/http/v1/node.clj
	test/com/puppetlabs/puppetdb/test/http/v1/resources.clj
	test/com/puppetlabs/puppetdb/test/http/v1/status.clj
	test/com/puppetlabs/puppetdb/test/http/v1/version.clj
	test/com/puppetlabs/puppetdb/test/query/facts.clj
Split metrics/version/command out of api.clj and into their own
namespaces