break some code out of FFI/Platypus.xs into refcount.c
basic closures