Extend filter logic to remaining CI workflows (#95437)
Per title, this extends CI filter logic to all remaining *smaller* workflows across pull, trunk, and periodic. These jobs can then be disabled dynamically. Before this, the filter logic only exists in major platform workflows including linux, windows, macos, and rocm.
* These *smaller* workflows now accept the `test-matrix` input with one the default shard
* `filter-test-configs` logic is added as a filter step
This is needed after https://github.com/pytorch/pytorch/pull/95442 in the event where we need to disable these jobs
### Testing
* Disable https://github.com/pytorch/pytorch/issues/95746 for testing. Confirm in https://github.com/pytorch/pytorch/actions/runs/4299047707/jobs/7493851429 that the job is disabled (skipped)
* Disable https://github.com/pytorch/pytorch/issues/95752 for testing. Confirm in https://github.com/pytorch/pytorch/actions/runs/4299049008/jobs/7512566000 that the job is disabled (skipped). Note that MPS is the special case where it could be triggered by `Mac MPS` or `trunk` workflows. So disabling MPS would strictly require both to be disabled. IMO, this is not a big issue as we would only need to disable `trunk` most of the times. Devs who attach `ciflow/mps` and use `Mac MPS` workflow know what they are doing
Pull Request resolved: https://github.com/pytorch/pytorch/pull/95437
Approved by: https://github.com/clee2000