Fix #25165 - crash when changing rest measure duration to or from irregular time.

When the actual duration of a measure is changed and either the starting or ending duration cannot be represented with a simple value (for instance 5/4) and the measure contains a single whole measure rest, a division by 0 results. See http://musescore.org/en/node/25165 for examples, discussion and analysis.

Fixed.

If the new measure value is different from the current time sig, rest(s) to represent the actual measure values are used instead of whole measure rests.
Tick where to place the newly added rests was wrong.
fix #25112 export slur on grace notes
fix #25112: import slur on grace notes
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 ( :( ).
fix #25424: ottava playback solved
Fix 25423 - Issues with staff types in parts

Issues:
- Creating part(s) for a score adds a whole set of staff types for each created part
- Editing staff types gives unexpected results in part staves and may cause crash

Fixes:
- New staff types are created only for the root score, not for linked parts
- When staff types are edited, the updated staff types are set into the root score staves as well as in the staves linked to them.
dont allow removal of courtesy timesigs
Fix part tests: all reference scores contained the duplicated staff styles
Merge pull request #840 from mgavioli/Fix_14576_hiding_courtesy_timesigs_corrupts_scores

Fix #14576 : hiding courtesy time sig corrupts score
Merge branch 'master' of github.com:musescore/MuseScore
This fixes Gentoo bug #507712 (https://bugs.gentoo.org/507712)

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
improve recent files menu, make it more 'standard'
Fixed GuitarPro tests.
Fix a regression for scores without parts (i.e. when root score staves are not linked to any other staff)
Merge pull request #843 from mgavioli/Fix_25423_Issues_with_staff_types_in_parts

Fix 25423 - Issues with staff types in parts
fix #18099, handle transposing instruments when creating parts
fix all.h dependency, hopefully less travis error
fix #25340