fix #24350: markings lost after timesig change

Annotations were completely lost, spanners placed incorrectly.  Also,
repeat measure symbol caused hang.  These are fixed.  Key signatures
still can get messed up, at least until reload.  And barline styles are
lost even when they coincide.
add test
fix repeat barlines & "free" annotations

* preserve repeat and other barlines where possible
* preserve "free" annotations - like chord symbols in the middle of an
otherwise empty measure
* update test
Merge pull request #658 from MarcSabatella/24350-markings-after-timesig-change

fix #24350: markings lost after timesig change