Replace the hasing strategy used for the memoisation (which was pickle.dumps)
with a safer choice (convert data structures to tuples)
Make the ReducedFunctional work with the recent changes in dolfin-adjoint