(PDB-454) Added support for querying/returning environments for resources and facts

All v4 responses for resources and facts should now return environments. Also supported
is querying for environments using equals and regexes.