Try to avoid crashes in the line searcher
With this patch, the line searcher checks for floating point errors, infinities and NaNs when extending its search interval. If it encounters one of those, it reduces the step size and tries again repeatedly. This actually seems to avoid crashes in real-world applications.
@all: If you have problems with minimizations aborting due to overflow etc., please give this one a try and report whether or not it works for you!