Add compare_set operation and test to TCPStore (#51593)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51593
Test Plan: Imported from OSS
Reviewed By: gchanan
Differential Revision: D26237328
Pulled By: H-Huang
fbshipit-source-id: c6837a4cc34f8247df6e1c29c1f40fd9e7953313