Add done() API to Future (#42013)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/42013
Test Plan: Imported from OSS
Reviewed By: rohan-varma
Differential Revision: D22729596
Pulled By: mrshenli
fbshipit-source-id: ed31021a35af6e2c3393b9b14e4572cf51013bc0