new API for setting __index/__newindex metamethod (object independent)