Add helpers to manipulate futures (#57846)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57846
In later PRs I'll need to create already-completed futures (it'll make sense then, I hope). Here are a few helpers for that, which I'm adding separately to reduce the noise later.
ghstack-source-id: 129567064
Test Plan: See later.
Reviewed By: mrshenli
Differential Revision: D28253664
fbshipit-source-id: f091e1d3ea353bb5bfbd2f582f1b8f84e4b0114f