Fix RNG reload in resume training from epoch checkpoint
# What does this PR do?

This PR fixes the reproducibility in training when checkpoints are saved every epoch. The main reason it was failing (as pointed out in #17032) is that the RNG states were never reloaded. They need to be reloaded exactly before iterating through the new epoch, as the call to this will change the global PyTorch RNG (even if the dataloader uses its own generator...) The new test added makes sure this reproducibility is fully tested.

While debugging this, two issues occurred, which this PR also fixes.
1. There are multiple warnings for the computation of flos when the model is not an NLP model. This PR reduces it to one.
2. The test of this reproducibility is flaky on multiple GPUs because it relies on some randomness inside the model, but the PyTorch RNG will be called in random order between the two "copies" of the model executed by `DataParallel` (an issue that wouldn't be the case with `DistributedDataParallel` but we would need to execute the test via  a launcher in that case). So in the test, we only do PyTorch randomness on one or zero GPU to fix this flakiness.

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