libmid: fix a lot of crashes and overflow errors
Merge branch 'master' of github.com:prozum/midiogre