cache,tree: move cmp_cache_name_compare from tree.[ch] to read-cache.c