Allow generateFunction to take a pointer.

E.g. instead of `generateFuntion("my_func", "x", ["y"]);` You do
`generateFunction("my_func", &x, ["y"]);`. This means that any changes to the
dependency structure will cause the generated function to be re-evaluated
(because x will change).