[`Flava`] Fix flava `torch.distributed.nn.functional import all_gather` issue
# What does this PR do?

Fixes https://github.com/huggingface/transformers/issues/23047
Flava had some code that were copy-pasted from the original repository: https://github.com/facebookresearch/multimodal/blob/c6f6e44ec6e0addfdf01695db860a6febeb2d88b/torchmultimodal/utils/distributed.py#L12 
From my understanding, It seems that there are two versions of `all_gather`: 
- `torch.distributed.nn.functional.all_gather` that backpropagates the gradients to all workers
- `torch.distributed.all_gather` that will backpropagate the gradients to the current worker only

cc @sgugger  

_The documentation is not available anymore as the PR was closed or merged._