midi-rubato: move towards being able to use as a library

(still need to get rid of the hyphen in the name though)
fix indentation
add --beatmap which invokes midi-rubato
trim trailing whitespace
split --resolution into --width and --height to allow arbitrary dimensions
Explain meaning of dots in video frame generation
extract findTopStaffLine() for legibility
lineIndices(): rename variables for legibility
Add some progress output for staff line calculations
Don't needlessly generate MIDI for preview
use new warn() function
fix deletion of temporary files so --keep finally works
use xrange() not range()
Improve progress output of PDF reading
use progress not print
big revamp moving all temporary files to a subdirectory

This removes the need to constantly clean up temporary files
since it can just be done at the end.  It also eliminates the
ugly KEEP_TMP_FILES global.

Also improved some variable names.
extract genWavFile() method
add FIXME for global runDir variable
improve progress output