Add an option that makes it possible to ensure that the last point is exactly for Tmax; make sure that we never exceed Tmax

Switching back to the previous loop arrangement would also make the last time of the result correct. With the loop written like this, the reported last time is the beginning of the last step, rather than the end of the last step.
If the end of the last time step were correctly reported, the new test with `1/(3 + ε)` would fail for `parameters.tmax_is_exact = false`, since we actually overshoot.
The same test with `1/(3 - ε)` would then fail both ways.