(PDB-557) Add support for standard query operators and subqueries

Now environments can be queried via URI or query parameter with the
normal operations (i.e. =, ~, not, and, or etc). Subqueries for
resources and facts are also supported.
Merge pull request #948 from senior/ticket/master/pdb-557-environment-subqueries

(PDB-557) Add support for standard query operators and subqueries
(PDB-204) Ensure all commands no longer need a serialized payload

This fixes 'replace facts' version 2 to support any JSON object, and no
longer accept a JSON serialized string.

This also iterates the 'deactivate node' command so that there is now a
new version (version 2) that will accept a string for its payload
designating the certname.

This means that there is no longer any need for any commands to require
a serialized JSON string for the latest command revisions.

In general this has been done to improve the usability of the API (json
inside json was confusing) and also provide a small amount of increased
performance by avoiding the extra serialization/deserialiation that was
necessary priority to this patch.

Documentation has been updated, tests as well. All terminus code is now
modified to not serialize the payload before submission.

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