cmd-midx: some performance optimizations.
cmd-midx: some performance optimizations.

Approximately doubles the speed of generating indexes.

apenwarr/bup,ToxicFrog/bup,ToxicFrog/bup,jbaber/bup,jbaber/bup,ToxicFrog/bup,mhoeher/bup,gevaerts/bup,mhoeher/bup,gevaerts/bup,ToxicFrog/bup,mhoeher/bup,apenwarr/bup,gevaerts/bup,pombredanne/bup,pombredanne/bup,jbaber/bup,mhoeher/bup,jbaber/bup,tjanez/bup,pombredanne/bup,gevaerts/bup,tjanez/bup,ToxicFrog/bup,pombredanne/bup,jbaber/bup,apenwarr/bup,mhoeher/bup,gevaerts/bup,tjanez/bup,mhoeher/bup,tjanez/bup,apenwarr/bup,pombredanne/bup,tjanez/bup,jbaber/bup,pombredanne/bup,tjanez/bup