refactor things to avoid keeping branches open when they are not being viewed. history objects are now ephemeral wrappers around branches, with the expensive-to-calculate whole history data being cached elsewhere, in a LRUCache. also fixes a logging setup regression and deletes some dead code.