Confirming an issue i realized, the LuaRef needs to only

unref when the final copy of it is destroyed, so either it internally
needs to do it or we should only work with a LuaRef through a shared_ptr
Decided on solution of using a shared_ptr to hold the reference number

then in the LuaRef destructor we check if we're the last users of the
shared_ptr and release the reference if we are

Short test + cout when freeing looks like this is good
removing test
Testing calling table self applied functions, but something is wrong

will have to investigate when I get home, for now out of time