Move most of the code from 'for-each-ref' to 'ref-filter' to make
it publicly available to other commands, this is to unify the code
of 'tag -l', 'branch -l' and 'for-each-ref' so that they can share
their implementations with each other.
Add 'ref-filter' to the Makefile, this completes the movement of code
from 'for-each-ref' to 'ref-filter'.
Mentored-by: Christian Couder <redacted> Mentored-by: Matthieu Moy <redacted> Signed-off-by: Karthik Nayak <redacted> Reviewed-by: Matthieu Moy <redacted> Signed-off-by: Junio C Hamano <redacted>