(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