Make cargo test on macos also run with `test:extended` (#17663)
## Summary
Currently we require `macos:test` explicitly even when `test:extended`
is set, but from discussions it seems `test:extended` should also
trigger `test:macos` so this change adds that.
This change also introduces a new `test-macos` plan output variable which is used as the new condition.
## Test Plan
CI.