Linux ALSA sequencer midi driver code

code cleanup - brace mathing etc.
make sure everything that gets allocated gets freed, opened closed.