(#23422) Use JSON in terminus instead of PSON

The PuppetDB API specifies that it is JSON, so we should parse it as
that and not as PSON.

Some Puppet classes (Puppet::Node and Puppet::Node::Facts) don't support
JSON serialization, so continue to use PSON serialization for them.
In Puppet 3.4.0+ they have methods to do seralization in other formats
than PSON though, so once support for older versions of Puppet is
dropped they can be seralized in JSON as well.
Merge pull request #776 from dalen/json_terminus

(#23422) Use JSON in terminus instead of PSON