Function: mergeForDiff()
function mergeForDiff(
before,
after,
diff
): DiagramModel;
One model to draw: after plus everything before had that after lacks (removed tables at
the end of tables, removed columns re-inserted after their former predecessor, removed refs,
enums, groups, notes). Spans of re-inserted elements point into before (span.file is
prefixed with before: so nothing reveals them in the editor's files).
Removed refs keep their before id; endpoints on a renamed table point at its new id.
Re-inserted columns keep their isFk flag from before. Views, records and the project come
from after.