Reorder code in LineSearchMinimizer.
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

DougFirErickson/ceres-solver,timfel/ceres-bin,stonier/ceres_solver,ysonggit/ceres-solver,DougFirErickson/ceres-solver,whuaegeanse/ceres-solver,kartikkumar/ceres-solver,kartikkumar/ceres-solver,DougFirErickson/ceres-solver,timfel/ceres-bin,ikoruk/ceres-solver,stonier/ceres_solver,ysonggit/ceres-solver,whuaegeanse/ceres-solver,stonier/ceres_solver,ikoruk/ceres-solver,entylop/ceres-solver,ikoruk/ceres-solver,stonier/ceres_solver,DougFirErickson/ceres-solver,ysonggit/ceres-solver,ikoruk/ceres-solver,whuaegeanse/ceres-solver,ysonggit/ceres-solver,timfel/ceres-bin,ikoruk/ceres-solver,entylop/ceres-solver,kartikkumar/ceres-solver,kartikkumar/ceres-solver,whuaegeanse/ceres-solver,entylop/ceres-solver,timfel/ceres-bin,entylop/ceres-solver