[polyml] Lifespan of pointers to callback functions passed via C FFI