Remove unnecessary variables from ref_list and ref_item which were
used for width computation. This is to make ref_item similar to
ref-filter's ref_array_item. This will ensure a smooth port of
branch.c to use ref-filter APIs in further patches.
Previously the maxwidth was computed when inserting the refs into the
ref_list. Now, we obtain the entire ref_list and then compute
maxwidth.
Based-on-patch-by: Jeff King <redacted> Mentored-by: Christian Couder <redacted> Mentored-by: Matthieu Moy <redacted> Signed-off-by: Karthik Nayak <redacted> Signed-off-by: Junio C Hamano <redacted>