[BE] Unify CI workflow dispatch
Move repeated headers to `common.gen_dispatch_headers`
Use this macro from linux_ci, windows_ci and macos_ci workflow templates
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74170
Approved by: https://github.com/atalman