This also drops the old-style date parsing. We just don't care
enough, since we dropped that format pretty early.
Yes, this could do with some cleanup, and a common library file.
Some day.
It's really a very generic thing: the notion of one sha1 revision
referring to another one. "fsck" uses it for all nodes, and "rev-tree"
only tracks commit-node relationships, but the code was already
the same - now we just make that explicit by moving it to a common
header file.