C++ API for string pinning in lua registry (isolated and with a refcount so that the lifetime is managed properly)