Change type of timeoutFutures_ key to time_point instead of duration (#31078)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31078
Make `ProcessGroupAgent::pollTimedOutRPCs` code more conventional.
- Use `std::chrono::time_point` to represent `endTime` instead of `std::chrono::duration`.
- Replace `std::condition_variable::wait_for(lock, endTime)` with `std::condition_variable::wait_until(lock, endTime)`.
- Remove the unnecessary `::getRPCRemainingTime()`.
ghstack-source-id: 95408482
Test Plan:
# Unit tests
```
buck test mode/dev-nosan //caffe2/test:rpc_fork -- test_rpc_timeouts
buck-out/gen/caffe2/test/rpc_fork\#binary.par -r test_rpc_timeouts
```
```
buck test mode/dev-nosan //caffe2/test:rpc_fork_thrift -- test_rpc_timeouts
buck-out/gen/caffe2/test/rpc_fork_thrift\#binary.par -r test_rpc_timeouts
```
Differential Revision: D5705442
fbshipit-source-id: ba54b7bdb84bc02d05c22360b01290d044bbfcf5