ref-filter: move get_head_description() from branch.c
Move the implementation of get_head_description() from branch.c to
ref-filter. This gives a description of the HEAD ref if called. This
is used as the refname for the HEAD ref whenever the
FILTER_REFS_DETACHED_HEAD option is used. Make it public because we
need it to calculate the length of the HEAD refs description in
branch.c:calc_maxwidth() when we port branch.c to use ref-filter
APIs.
Mentored-by: Christian Couder <redacted>
Mentored-by: Matthieu Moy <redacted>
Signed-off-by: Karthik Nayak <redacted>
Signed-off-by: Junio C Hamano <redacted>