Don't stop at num_epochs when using IterableDataset
# What does this PR do?

Currently, when someone uses an `IterableDataset` inside the `Trainer`, the training loop stops after 3 iterations over the iterable dataset, this PR fixes that to just rely on `max_steps` (has to be set or there is an error at init).

Fixes #12499