PTFM-4952 Load DNAnexus environment from JSON config.

Refactor the loading and storage of the environment variables into a new
class DXEnvironment.