MuseScore 10/07/2015: Refactoring

There were three buttons (Ok, Cancel, Show detailed information) in the message box mentioned in previous post.

I added "Assign next free MIDI channel" button, it helps to find next free MIDI port/channel (really? :) ) to prevent conflicts. This required to separate a part of Score::rebuildMidiMapping() into a new function. After that I refactored some part of Score::rebuildMidiMapping() to stick to Don't Repeat Yourself (DRY) principle. Now the code is more readable, but still needs to be refactored.