Make automatic cache shrinking more efficient

Instead of only deleting the bare minimum of objects, shrink it to 90%.
Otherwise, once you hit the limit, you will get a cleanup on almost every
object file - which is a fairly expensive operation with large caches.

Patch courtesy of Vyacheslav Chigrin <vchigrin@yandex-team.ru>, I
just renamed one variable a little bit.