Backup/restore Composer environment variables

The tests could fail if an environment variable replaces an expected
value.
Revert "Backup/restore Composer environment variables"

This reverts commit 725a4fd638c7f339cdf5f1daaff0899bdbca24d3.
Allow reading of COMPOSER_ environment variables to be disabled
Update config tests to not use environment variables
Merge pull request #3448 from cs278/config-env-test

Fix config tests when environment variables are set