metacache: Speed up cleanup operation (#11078)
metacache: Speed up cleanup operation (#11078)

Perform cleanup operations on copied data. Avoids read locking
data while determining which caches to keep.

Also, reduce the log(N*N) operation to log(N*M) where M caches 
with the same root or below when checking potential replacements.
minio/minio,balamurugana/minio,NitishT/minio,krisis/minio,NitishT/minio,vadmeste/minio,krisis/minio,donatello/minio,balamurugana/minio,donatello/minio,NitishT/minio,NitishT/minio,vadmeste/minio,minio/minio