cache: free the cache table when it is empty and set to NULL We do the latter for the benefit of libpkgconf. This cleans up a significant number of memory leaks in the cache handling.