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

It just feels C-like. Make Status have an Err() error method that returns nil for non-error conditions (however you define that).