restore diagonal in Levenberg

Backup and restore the diagonal in Levenberg.
This should solve some numerical issues, if lambda (the value added to
the diagonal) is huge. Substracting it may "recover" the wrong values.
MSVC Patch by Jonas Witt