fix #17906: when a chord is detected on MIDI input, the cursor is moved ...

...back before adding each subsequent note after the first, so that all of them become part of the same chord at the same position; the 'active' variable in MuseScore::midiNoteReceived() is used in a comparison, instead of directly as a parameter, since sometimes it can be -1

This should fix http://musescore.org/en/node/17906 - I'm new to MuseScore source code, this may not be the best solution