sha1_name: introduce ref:refname for refname objects
sha1_name.c: resolve ref: to ref:HEAD

Resolve ref: to ref:HEAD which is the refname of the current branch.