MuseScore 06/07/2015: tests for rebuildMidiMapping() #3

Creating tests helps a lot to find more bugs, so I found and fixed a few in rebuildMidiMapping().
I added several test cases for reading partially initialized mapping from MusicXML. MIDI mapping is partially initialized when software that produces MusicXML file doesn't write <midi-device> or <midi-channel> tags or if we have number of ports >16 (<midi-device> allows to set port only in range 1-16).
Also I added test cases for reading mapping from gp* files and started to work on tests for reading mapping from *.mid files.