Add JSON Utils from PuppetDB

These are general enough that there's no reason for them to be in PuppetDB, and the [mq library](https://github.com/puppetlabs/mq) I'm also spinning out of PuppetDB relies on it, so there's even a good reason for them not to be in PuppetDB (currently I have them pasted in to mq, but once this PR is merged in I can stop doing that).

One unsavory thing about this PR is that it duplicates PuppetDB's `temp-file` test utility. I'll be opening up another PR on TrapperKeeper to add that to its test utils.