refs: keep track of unresolved reference value in iterator
Since ref iterators do not hold onto the direct value of a reference without resolving it, the only way to get ahold of a direct value of a symbolic ref is to make a separate call to refs_read_symbolic_ref.
To make accessing the direct value of a symbolic ref more efficient, let's save the direct value of the ref in the cache so the iterator has access to it.
To do so, we need to add an argument to refs_resolve_ref_unsafe to save the direct value of the reference to.
Signed-off-by: John Cai johncai86@gmail.com