Write "all notes off" event at end of each song

Fixes "the phenomenon where a note at the end of the song is not cut off
and then proceeds to sustain over nearly half the song until it by
chance finally plays that note again". This issue occurs for D_DDTBLU.
Solution found in Eternity Engine. Issue raised for Chocolate DOOM here:
https://github.com/chocolate-doom/chocolate-doom/issues/412.
Reformatted the code in mus2mid.c quite a bit too while I was at it.