resizeIndex method
Grows the reverse-index array to at least capacity. New slots are
initialised to kNotVisible. Call from the same code path that
grows every other per-nid dense array the controller maintains.
Implementation
void resizeIndex(int capacity) {
if (capacity <= _indexByNid.length) {
return;
}
final grown = Int32List(capacity);
grown.fillRange(_indexByNid.length, capacity, kNotVisible);
grown.setRange(0, _indexByNid.length, _indexByNid);
_indexByNid = grown;
}