luaobject.go
func NewLuaObject(L *lua.State, idx int) *LuaObject {
	L.PushValue(idx)
	ref := L.Ref(lua.LUA_REGISTRYINDEX)
	return &LuaObject{l: L, ref: ref}
}
func NewLuaObject(L *lua.State, idx int) *LuaObject {
	L.PushValue(idx)
	ref := L.Ref(lua.LUA_REGISTRYINDEX)
	return &LuaObject{l: L, ref: ref}
}
// NewLuaObject creates a new LuaObject from stack index.