Fix clef change and courtesy clef display.

Clef changes and courtesy clef on/off display have several issues: changed clef is not always shown, courtesy clefs on/off is unreliable and so on.

In this fix:

- A clef change at measure boundary is always placed at the end of the previous measure (unless for the very first measure).
- This measure-final clef is never destroyed or re-created (the clef at the beginning of the next staff is managed by Score::layoutSystemRow() as before): this ensures a consistent context.
- Showing / hiding of a courtesy clef is managed by Clef::layout() rather than by Score::layoutSystemRow() as before.
- The clef change on measure boundary (always at the end of the previous measure and always present) is shown if:
-- there is not another clef at the beginning of the next measure (not a courtesy clef at all);
-- the score is set to show courtesy clefs
-- the previous measure is not the last of a repeat or of a section
-- the individual clef is set to show courtesy clef.
- In all other cases, the clef is hidden (i.e. laid out to a element without any symbol).
- The Clef Inspector is changed so that, if there is a pair of matching courtesy and main clef, their Show Courtesy flags are kept in sync (modifying either modifies both)
use standard functions in pitch2xml instead of homegrown
add MusicMXL regression test script
add tablature testfile for B#, B##, Cb and Cbb
cleanup pitch2xml
cleanup pitch2xml
add testTablature3.xml  to tst_mxml_io.cpp
Merge pull request #603 from lvinken/23969-Cb-in-tab

23969 cb in tab
fix #23913: Crash on copy of selected chord symbols
add test for #23913
Add test.
Merge pull request #601 from mgavioli/Fix_clef_change_and_courtesy_clef

Fix clef change and courtesy clef display.