gitk: Fix some problems with the display of ids as links
First, this fixes the problem where a SHA1 id wouldn't be displayed
as a link if it wasn't in the part of the graph that had been laid
out at the time the details pane was filled in, even if that commit
later became part of the graph. This arranges for us to turn the
SHA1 id into a link when we get to that id in laying out the graph.
Secondly, there was a problem where the cursor wouldn't always turn
to a hand when over a link, because the areas for two links could
overlap slightly. This fixes that by using a counter rather than
always reverting to a counter when we leave the region of a link
(which can happen just after we've entered a different link).
Signed-off-by: Paul Mackerras <paulus@samba.org>