gitk: New infrastructure for working out branches & previous/next tags