steepest_descent_new: the callback function can now stop the Iteration by raising a StopIteration exception.