(PDB-452) Adding support for storing environments

Added support for environments to the model and command wire formats.
Minor doc changes
Merge pull request #894 from senior/ticket/master/pdb-452-support-environments-in-commands

(PDB-452) Adding support for storing environments