MidiOutput Bug if more than one device is open

OK I’ve added most of your patches in one form or the other to the develop branch. Please let me know if this works for you as intended.

However, I’m holding off on the last patch which sets the thread priority. Having developed Equator for the Seaboard on an embedded linux chip, we have a few ALSA midi threading experts here at ROLI and I’m waiting for their opinion before I change this.

Thanks for your help!