Fix up so that almost all tests pass against hg 3.4 and git 2.3.5.
gitlog: clean up refs iteration and blacklist refs/stash
gitlog: always use a set() of heads, instead of a sorted list
gitlog: actually update the cachedheads entry when done loading the cache
gitlog: tweaks to the phony manifest class to fix 404s in the web interface