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

Yeah, not sure. I do feel though that there are a number of things here that are serving different purposes (the fact that you have some *Error consts says this even without the C-like status return). I think it needs more thought. Maybe move the Failure types out as errors (they can still be derived from int) and have Status do the Err() (and or Early()) thing. Think about how io.EOF is used - it's not necessarily an error.