ReducedFraction class with int overflow detection (MIDI import)
Fix #23481: crash due to int overflow on import of a big MIDI file
Small refactoring for shorter code
Merge pull request #575 from trig-ger/midi_fraction

Int overflow detection for fractions + fix #23481