MBS-3669: when merging entities, merge undated rels into dated ones

In fact, this simply deletes the undated rel if there's a matching dated
one. But conceptually it's a merge.
MBS-3669: linebreaks for width
MBS-3669: also check link.ended, and count rels with it true as dated (thanks ocharles!)
MBS-3669: only delete undated duplicates where there is no dated relationship on the same entity, as when there is this suggests the duplication is intentional
MBS-3669: explicitly mention end_date_* columns, for clarity
MBS-3669: add a bunch of tests for merging and not merging, as appropriate
Merge branch 'beta' into mbs-3669-merge-rels
MBS-3669: add three-entity and flipped-direction tests
Merge branch 'beta' into mbs-3669-merge-rels
Merge branch 'mbs-3669-merge-rels' into beta

* mbs-3669-merge-rels:
  MBS-3669: add three-entity and flipped-direction tests
  MBS-3669: add a bunch of tests for merging and not merging, as appropriate
  MBS-3669: explicitly mention end_date_* columns, for clarity
  MBS-3669: only delete undated duplicates where there is no dated relationship on the same entity, as when there is this suggests the duplication is intentional
  MBS-3669: also check link.ended, and count rels with it true as dated (thanks ocharles!)
  MBS-3669: linebreaks for width
  MBS-3669: when merging entities, merge undated rels into dated ones