[GHF] Refactor + test for revert checks (#82381)
Refactor revert checks into `validate_revert` and add check for
`COLLABORATOR` but not a member
This is preliminary change for https://github.com/pytorch/pytorch/pull/82360
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82381
Approved by: https://github.com/ZainRizvi