Enable use of best epoch in Trial, with early stopping, during hyperparameter search
### Feature request

When running a `Trainer.hyperparameter_search`, each trial's value is calculated from the last epoch's chosen metric. However, especially when using early stopping and `load_best_model_at_end`, it would be useful to use the best model instead.

This could be a parameter of `Trainer.hyperparameter_search` or a an overridable function getting the best value, or some callback.

### Motivation

Often, we use early stopping and take the best model from a particular run because it's possible for models to start overfitting and dropping off after a certain number of epochs. This phenomenon can also appear during hyper parameter search and, as such, we'd like to be able to use the best epoch's value to compare trials.

Without this we may get results that are not fully representative.

### Your contribution

Happy to help testing or in other ways I can. Not sure where to start but if there is a clear place to do it I'd be open to help.
cc @sgugger <|||||>Yes this is not currently supported. Could be nice to add, but this is not high-priority on our side, so it would have to be a contribution :-) Happy to review a PR!