Fixes the training resuming with gradient accumulation
# What does this PR do?

As #5605 pointed out, there was a mistake in the way the number of steps to skip was computed when the `Trainer` wants to resume training from a checkpoint with gradient accumulation activated. This PR fixes that and adds more tests. More specifically:

1. It tests a regular gradient accumulation training (wasn't done before) and checks it gives the same results as the same training with the batch size multiplied by the number of gradient accumulation steps.
2. It adds a test of a training resuming with gradient accumulation (which fails on current master)
3. It fixes master so that the test in 2 passes.

Fixes #5605