Trainer support for IterableDataset for evaluation and predict
# What does this PR do?

This PR rewrites the entirety of the evaluation loop to add support for `IterableDataset`. The main problem with the current training loop is that, in distributed settings, it expects the indices of the evaluation set to come like this:
- `[0, 1, 2, 3, 4, 5, 6, 7, ...., 99]` for process 0
- `[100, 101, 102, 103, 104, 105, 106, 107, ...., 199]` for process 1
(if we have 200 samples)

In an `IterableDataset` we don't know the length at the beginning of the process, so we can cleanly cut the indices in half like that. Therefore, the indices will come like this (with a batch size of 4):
- `[0, 1, 2, 3, 8, 9, 10, 11, ...., 192, 193, 194, 195]` for process 0
- `[4, 5, 6, 7, 12, 13, 14, 15, ...., 196, 197, 198, 199]` for process 1

The rewrite of the evaluation loop is done to:
- change the sampling indices in a normal `Dataset` to be the same as an `IterableDataset`
- change the way predictions and labels are gathered accordingly
- avoid having one evaluation loop for `Dataset` and one for `IterableDataset`

To avoid any breaking change:
- the old evaluation loop is still there with the same name (for people who subclass Trainer) and can be used if one passes the flag `--use_legacy_prediction_loop`.
- the old `DistributedSequentialSampler` and `DistributedTensorGatherer` are left and deprecated