Improving convergence checking in the minimizer.

Splitting into two checks:
1. That the solver reached the solution.
2. That the solver converged (either reached the solution or stopped).

This is because 2. might happen before 1. which may lead into numerical problems.

Change-Id: Ide3ad6ee0fb97b96694d40ae9c59a86ffff78d8b
3 files changed