Allow to compute local gradient and Hesse matrix together
This can be considerably more efficient, because the two methods sometimes share a considerable amount of code. The prime example for this is the energy density of a degraded elastic material with a spectral split. In that situation, both the gradient and the Hesse matrix implementations need an eigenvector decomposition of the strain, which is quite expensive. With the new code, the eigenvector decomposition is computed only once and used for both the gradient and the Hesse matrix.