Reorder code in LineSearchMinimizer.

Change the order in which IterationSummary objects are
added to Solver::Summary and when the convergence tests
are done.

Previously there was a bug which prevented the iteration summary
from carrying the correct cost of the current state of the
optimization problem as the convergence test triggers before
the cost can be updated.

Thanks to Thad Hughes for reporting this.

Change-Id: Iba0dbb4cb30c9ec79fbc72ec5cf4602b2a0c207b
1 file changed