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

Thinking further, this seems like a good case for flags.

    const (
        NoEvaluation EvaluationType = 0
        Function EvaluationType = 1 << iota
        Gradient
        FunctionAndGradient = Function|Gradient
    )