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

How about a "LinesearchLocation" that behaves similarly to Location

type LinesearchLocation {
     F float64
     Derivative float64
    Loc float64
}

Then we can add to it as necessary like Location without breaking API (for example, ProjHess). I'd like a better name than LinesearchDirection, but I can't think of anything at the moment.

The idea of the gradient not existing already exists in the code, so I think it'll be fine going forward, though you're right that there needs to be an if statement. If it's all the same to you, I'd rather add that if statement when we have a gradient-free linesearch method.