(PUP-3512) Use new Profiler API

Change the `profile` function in PuppetDB to use the new Puppet
Profiler API in preparation for removing the old API from Puppet.
Modify all calls to the `profile` function in PuppetDB to pass in
a metric ID.
I'm thinking maybe this one should have `request.key` moved to the end, after :query_nodes, so that you can look at cumulative metrics for all `query_nodes` operations.