QMidi refactor, Stage 3

Move pointers to a `struct`. No API change.