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

I feel that it might be more future-proof if it does not over-complicate things, LinesearchMethod would not explicitly depend on having the gradient available.