[trainer] improve code readability
This PR:

* removes redundant code, as:
```
self.model = model if model is not None else None
```
and
```
self.model = model
```
are the same.

* decouples attribute assignment from code logic - which simplifies things further.

@sgugger, @LysandreJik 