Implemented dfunc_tensor_opt() and d2func_tensor_opt() allowing all optimisation algorithms to be used.
The 'fixed' N-state model can now be optimised using Newton optimisation. On my machine, the
performance vs. Nelder-Mead simplex for ~20 states is a drop from ~1 hour to less than one minute!