Draft: Test if energy is NaN in `IterationController.check()`

Lukas Platz requested to merge check_nans_in_ic into NIFTy_8

Until now, neither minimizers nor iteration controllers check whether the energy.value has become NaN.

The proposed changes are just a quick draft - please change them if needed.

Merge request reports