Index RNG states by global rank in saves
# What does this PR do?

As pointed out in #17829, in a multi-node training the `Trainer` saves the RNG states with the same filenames in the various nodes. This causes problems when the nodes share the same file system, so it's easier to just save each file indexed by global rank instead.

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