Initial commit of functions from github.com/btracey/optimize

I don't know, that feels weird to me. If you told the optimizer to stop after 10 iterations, and the optimizer stopped after 10 iterations, that's not an error. How about something like

// Early returns true if the status indicates the optimization
// finished before the optimum was found, for example if the maximum iteration 
// was reached rather than finding a location with a low gradient norm.
Early() bool