[ModelOutput] Proposal to fix compatibility issue with torch.DataParallel
This is a proposal to fix #5693 by making `ModelOutput` inherit from a dictionary and behave like a dictionary on iteration (i.e. iterate over the keys rather than the values).

This could break backward compatibility when users iterates over the output tuple rather than indexing it.

On the other hand, we regain backward compatibility with `torch.DataParallel` and from a more general design point of view the `ModelOutput` class should probably be closer to a dictionary than a tuple in the future.
Update: this is actually not working because it breaks the possibility to unpack the output of the model's forward pass which is obviously a common pattern (cf failure in the tests) :-/<|||||>This is superseded by #6138 now.