[trainer] move secondary methods into a separate file
We are trying to keep `trainer.py` to a manageable size and as of recent it has been getting new helper methods which should remain methods, but aren't really important for understanding how the Trainer works, so we propose to move them into the utils file and then import them using this nifty idea presented at https://stackoverflow.com/a/47562412/9201239 where instead of subclassing and mixing in, we import the desired methods into the class.

See if you like it. 

And if yes please let me know if there are any other candidates to move.

@sgugger 