Sort mbeans returned by /v2/metrics/mbeans
Add leading-uris helper func

This allows us to easily determine all the path of a given URI, for use
in middleware (among other things).
Add multitime! macro

Let's say you'd like to execute some code, but you want to wrap it in a
call to `time!` so that its performance is tracked. That's great, but
what if you want to have its performance tracked in multiple timers
simultaneously (e.g. a more specific timer, and a roll-up timer)?

The `multitime!` macro works exactly like `time!`, except it support
multiple timers.
Support multiple timers in wrap-with-metrics middleware

Normalization functions can now return more than one metric name. If so,
then each of those metrics are updated when the request is executed.
Capture request metrics on per-url/per-path basis

When we migrated to versioned urls, we didn't update our metrics
middleware. Originally, we had urls like /resources, /commands, etc.
We configured the metrics middlware to only take the first component of
the path and create a metric for that, so we had metrics that tracked
all requests to /resources, /commands, etc. and all was right with the
world.

When we moved to versioned urls, though, the first path component became
/v1, /v2, etc. So the metrics are now rolled up at that level, which
is...not very useful at all, actually. It also breaks the documented
API.

I've modified the call to wrap-with-metrics to instead track metrics for
all the leading components of a url. So if you request /foo/bar/baz,
we'll track metrics for /foo/bar/baz, as well as /foo/bar and /foo.
Multiple urls that share leading path components will be treated as
rollups.

Because each url has a corresponding metric, and metrics are exposed via
the /metrics endpoint, to avoid a situation where requesting a metric
creates a new metric (and so on, it's metrics all the way down) I opted
to collapse all metrics requests to a single metric.
Restore compability for v2 metrics urls
Update metrics docs to reflect the new structure
Support mbeans with "/" in their names
Don't collapse metrics requests, for consistency
Add support for setMaxConnectionAge in db connection
Create new conn-lifetime setting

This restores the original behavior for conn-max-age (for
backwards-compatibility reasons), and creates a new option called
`conn-lifetime` that governs how long idle/active connections stick
around.
Fix typo in metrics route
Merge pull request #571 from grimradical/metrics-fixes

(21618) Track HTTP metrics for each URL, restore compatibility with v2 metrics api
Document db pool settings
Change default db conn keepalive to 45m

This better matches up with the standard firewall or load balancer
idle connection timeouts in the wild.
Merge pull request #580 from kbarber/ticket/master/19174-query-optional

(#19174) Change query parameter to optional for facts & resources
Merge pull request #587 from grimradical/pullreq_586

Add conn-lifetime setting to DB pool
(#21732) Allow SSL configuration based on Puppet PEM files

This commit introduces some functions for reading keys and
certificates from PEM files, and dynamically constructing java
KeyStore instances in memory without requiring a .jks file on
disk.

It also introduces some new configuration options that may
be specified in the `jetty` section of the PuppetDB config
to initialize the web server SSL settings based on your
Puppet PEM files.  This provides us with a path forward for
removing the `keytool` calls and such from the `puppet-ssl-setup`
script in the future.
(#21732) SSL PEM parameter name changes & puppetdb-ssl-setup handling for pem files

This changes puppetdb-ssl-setup to assist setup of PEM based files instead
of keystore based files.

The script however tries to be delicate around legacy setups, failing to run
if the user still looks like they have a keystore setup without the -f
switch. This is so users who already have keystore based setups can choose
to migrate when they wish, instead of a package upgrade forcing them to.

Users who install from scratch however, will now have puppetdb-ssl-setup
copy the certificates from Puppet into the correct places for them and
configure SSL as before, but instead with PEM files.

This patch also changes the names of parameters from the original patch to
remove the puppet-agent-* prefixes.

Documentation that relates to puppetdb-ssl-setup has been modified to suite
the new behaviour.

Signed-off-by: Ken Barber <ken@bob.sh>
Upgrade bcpkix-jdk15on to latest revision

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