Update on "[reland] move rebuild buckets from end of first iteration to beginning of second iteration"
[test all]
Update for relanding: in ddp.join(), moved _rebuild_buckets from end of backward to beginning of forward as well.
Part of relanding PR #41954, this refactoring is to move rebuild_buckets call from end of first iteration to beginning of second iteration
Differential Revision: [D23735185](https://our.internmc.facebook.com/intern/diff/D23735185/)
**NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D23735185/)!
[ghstack-poisoned]