Fixes to Levenberg-Marquardt code.

Does not yet update to the style of taking a g(x) that mutates a storage array.
But, at least this update gets things running again.
Merge pull request #21 from blakejohnson/lm-fixes

Fixes to Levenberg-Marquardt code.