testhelper: ModifyEnvironment cleans after itself
Prior to this change, ModifyEnvironment was returning a function to revert the changes done. This was typically passed to defer or to t.Cleanup().
This change moves calling t.Cleanup() to the ModifyEnvironment function itself.