Change LuaFunction to subclass of RefCounted.