Add globalenv to run summary (#4090)
This commit adds a list of environment variables that affect every task hash into
the run summary. These could be configured via `globalEnv` or from turbo
itself. There are three separate but related changes here:
1. Refactors the env package so it can get env vars matching a regex
- Adapts the existing framework prefix matchers to use that)
- Adapts calculateGlobalHash to use the env package to get global env keys
2. Changes `calculateGlobalHash` implementation to use a named struct
Keep the anonmyous struct to keep global hashes stable, but lets us keep
a handle on global env vars in an env.DetailedMap` struct so we can get
"secret" hashed values for run summaries
3. Finally, adds the `global` env vars to each task summary.
I chose to add these env vars to the task summary, instead in the global
space, so that a single `TaskSummary` contains everything needed to
diff between runs