slowly moving the branch-specific stuff into a common structure... the changes cache is now its own class (ChangeCache) like TextIndex, and both are fields in History. almost all of the cache rebuilding logic, etc, has been moved there and out of __init__.