Context
In some places in the code we need to get all MWReferenceNodes using the same listKey, aka the reuses. Currently this can be done by calling InternalListNodeGroup.getAllReuses that uses InternalListNodeGroup.keyedNodes. If we want to move away from the listKey as identifier for reuses, we need another way to get "all reuses" of a ref by using the listIndex.\
Currently there's only a mapping on group level that's about the listKey. A mapping based on the listIndex should be stored in the InternalList directly.
Task
- Maintain a map in ve.dm.InternalList.addNode whenever nodes are added
- Make sure nodes are removed in ve.dm.InternalList.removeNode