pack-refs: merge code from pack-refs.{c,h} into refs.{c,h}