MIDI: moved real timestamp computation to separate function
Changed midi reading to correspond to the way frets-on-fire does it:
it seems that FoF enqueues tempo events from all tracks together and does
other weirdnesses as well, and if there is no tempo marker it completly
fails to decode the midi (will fix that later), but compatibility is
probably the best approach.

PS. previous commit was completly flawed
Fixed warnings in clang