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

Done. Should it be panic("bfgs: ") or panic("BFGS:")?