Move dat_ptr function generation into node

This way I can ensure that the name mangling is the same between the
C++ code and the LLVM code.  Note that I'm not actually doing that yet
(I'm just working on the LLVM code for now), but the goal is that will
eventually happen...