Implement a light version of "git show-ref"

This replaces the call to "git show-ref" in git.list_refs() with roughly
equivalent python code.  The original implementation of list_refs() is
moved to tgit.py, so we essentially make "git show-ref" the gold
standard to test our own version against.

The eventual upside of avoiding the git call is that, as the disk access
patterns suggest, "git show-ref" actually checks the object hierarchy to
see if the refs can be dereferenced.  For a bup repository of any
substantial size, this is too costly, so here we sacrifice this early
integrity check.  However, we won't really see the advantage in
benchmarking yet: we'll have to get rid of the subsequent calls to "git
rev-list", too.

Note I've also amended the docstring for list_refs(): if you pass a very
generic refname (say, "master" in a git repo), you may expect to get
more than one item.  That behaviour is consistent with "git show-ref".

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>