keyword arguments for curve_fit, small fixes to levenberg_marquardt

The curve_fit change just makes it easy to set the levenberg-marquardt options.

The type definition of OptimizationState did not match the code here anymore, so setting show_trace = true would throw type errors.

Finally, after relaxing the check for decrease of residual a bit, some models which would throw an error previously, now converge to something close to what I'd expect theoretically.