optimize: Consider adding Method.Supports(Function) (bool, error)
Created by: vladimir-ch
@btracey 's comment from #45 : Given we do use some magic, I can see the need for support. It seems like the better case is for the optimizer to have a Support function that either returns a boolean (if it supports), or an error which is nil if it supports, and provides a detailed explanation if it isn't, i.e. "Bfgs requires the Function to have a Gradient. Function does not implement either Gradient or FunctionGradient."