Make canned loss functions more robust.
Make canned loss functions more robust.

The loss functions that ship with ceres can sometimes
generate a zero first derivative if the residual is too
large.

In such cases Corrector fails with an ugly undebuggable
crash. This CL is the first in a series of fixes to
take care of this.

We clamp the values of rho' from below by
numeric_limits<double>::min().

Also included here is some minor cleanup where the constants
are treated as doubles rather than integers.

Thanks to Pierre Moulon for reporting this problem.

Change-Id: I3aaf375303ecc2659bbf6fb56a812e7dc3a41106

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