remove old cruft and make Mercurial history parsing more strict so that it can detect format changes
fixes #743