While we're here, also add `brew tests --no-parallel` which I relied
on during testing.
Pretty much anywhere we rely on a stubbed formula on disk to work: we
need to disable the API.
- Rather than maintaining a list of Homebrew environment variables to
delete, delete all Homebrew (and Portable Ruby) internal variables
that won't be used by other tools.
- When exporting variables, only export variables that have changed.
- When exporting PATH-like variables, ensure the PATH is appending to
the existing path rather than replacing it and ensure we only include
newly added paths.