Fix/memory leak

Cached objects (e.g. JITModule) should not hang on to args (which reference dats and the like).

Really, a jit module only needs the meta data, but it's easier to pass the arg itself in.  To fix the memory leak, after compiling and generating the function pointer we need, we blow away all references in the jitmodule to anything other than the function pointer.

The first commit is unrelated (but I was in the area), it improves caching for kernels generated from asts.  Two asts of the same kernel don't hash the same (this is noticeable in firedrake expressions).