[futures] Add specific python unittest coverage for collect_all/wait_all (#40233)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/40233
There was a question earlier whether torch.futures.wait_all() would
raised if the underlying futures raise (it was supposed to, but no test
coverage). This change adds a couple very basic torch.futures.collect_all/
wait_all tests.
ghstack-source-id: 106168134
Test Plan: buck test mode/dev-nosan caffe2/test:futures
Differential Revision: D22120284
fbshipit-source-id: 3a8edae5dbf8c58c8361eff156c386a684ec5e86