feat(turbo_json): allow for extending form non-root `turbo.json` (#10812)
### Description
TL;DR Allow for `"extends": ["//", "@acem/my-pkg"]` to allow for shared
task configuration outside of the root.
This PR adds non-root extensions of `turbo.json` files. We still require
all `turbo.json` files to extend from root first, but now you can extend
from an additional package `turbo.json` files. The task definitions are
collapsed left to right with the right fields taking precedence. (This
can be more powerful when using `$TURBO_EXTENDS$` added in
https://github.com/vercel/turborepo/pull/10763)
We do have to check for cycles in `turbo.json` extends statements to
ensure we can resolve the `extends` chain.
Prefactor steps taken:
- Splitting of the `RawTurboJson` schema into a root schema and a
package schema. This removes the need for our ad-hoc checks of all
fields in a package `turbo.json` that are invalid. (We were missing
quite a few, for example you could put `globalEnv` in a package
`turbo.json` and it would be silently ignored)
- Changed ordering of task definition chain construction to first load
all necessary `turbo.json` before fetching task definitions
- Created a `Validator` struct which is used to share context which
affect validation outcomes. This is necessary to feature flag this
behavior
I highly suggest reviewing each commit by itself as there is a lot of
prefactor work that muddies the feature addition.
### Testing Instructions