refactored tons of treemap code

numerous other changes:

RebuildExtensionData now uses a functor, drawing looks up the file color
in a map,

also changed all (CRect).right - (CRect).left statements to
(CRect).Width() function calls, same for Height; earlier changes were
misguided

Added some SAL annotations for array accesses.