[reland] Gate DistributedOptimizers on RPC availability
reland due to windows + cuda failure, fix by running it on gloo on windows even with cuda.
Differential Revision: [D30177734](https://our.internmc.facebook.com/intern/diff/D30177734/)
**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D30177734/)!
[ghstack-poisoned]