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

I am not sure about this one: is Linesearch meant only for functions that can evaluate its gradient? If not, then loc.Gradient will be nil, won't it? Otherwise it should be documented somewhere. But in that case we exclude for example coordinate descent (not a big loss, but if we could support it, then why not?). projGrad then would not make sense and any change would ripple through the code ... as I said, not sure about this one.