Automatic control of JACK/ALSA MIDI Out ports

With this feature MuseScore users can deal with MIDI faster and more comfortable. Now they don't need to think about MIDI Out ports number ("-Why it doesn't sound? <...> Ah, I have to increase midi ports number...").

I used "lazy" approach to prevent flooding to JACK/ALSA with a lot of API calls: we add new ports only if we really need to do it (e.g. when opening a score with a lot of staves OR when adding a new instrument).

Example: If we have several scores opened with 1, 3 and 2 midi ports, we'll have 3 midi out ports even if we switch between scores (would not change from 1 to 3 and 2).

Recomputing number of midi ports is also optimized: we don't need to do an extra loop every second/tick/etc.

You can read about this new feature here:
http://igevorse.lited.net/p14.html
http://igevorse.lited.net/p18.html
can you name it with _ and call the getter maxPortNumber like other accessors?