Fix #14576 : hiding courtesy time sig corrupts score

See http://musescore.org/en/node/14576 for discussion and examples.

1) Edited courtesy time sig (in any parameter: visibility, colour, text, ...) are saved to the score
2) When read back from file, such a time sig is not recognized as courtesy time sig
3) If the edited courtesy time sig no longer is at the end of a system, it is not removed.

The straight approach could have been to disable any editing of courtesy time sig. Rather than loosing this flexibility, I tried to improve the management of courtesy sigs:

1) not changed
2) when reading a time sig, if not at the beginning of a measure, now it is turned into a courtesy time sig
3) courtesy time sig removal now depends on its position in the system and not on the generated status.

This patch also do the same changes, in the same code areas, for courtesy key signs, as they behave in a very similar way.
Fix compilation errors ( :( ).
Merge pull request #840 from mgavioli/Fix_14576_hiding_courtesy_timesigs_corrupts_scores

Fix #14576 : hiding courtesy time sig corrupts score