Fix division of MIDI files in format "fps and ticks per frame"

There are two ways to specify the time division of a MIDI file: 
beats per second + tempo event OR frames per second and ticks per frame
(see here: http://www.recordingblogs.com/sa/tabid/88/Default.aspx?topic=Time+division+(of+a+MIDI+file)).

The second case was processed incorrectly in MidiFile class and in MIDI import, so this is a fix for it.
And here is a test MIDI file:
https://drive.google.com/file/d/0B5alKuFoSol2SGZoalhrNjdiM0E/view?usp=sharing

Old import: http://wstaw.org/m/2014/11/09/division_old.png
Now it is imported correctly: http://wstaw.org/m/2014/11/09/division.png

Same bug was in Sonic Visualiser: http://sourceforge.net/p/sv1/bugs/138/
(MIDI file from there).