deref method
Unpacks a lua object if it holds a reference to another lua object during runtime. Otherwise if isRef is false, then it returns itself.
Implementation
LuaObject deref() {
if (!isRef) return this;
return (_value as LuaObject).deref();
}