Refactor ItemRepositoryRegistry::open(): do not check the cache-dir for emptiness.
Instead, move all clear-related checks inside the "do..while" for a
slight optimization - if got "clear = true" by one of criteria, don't
even bother checking the others.
And get rid of a commented warning message-box at clear time - IMO it
won't make much sense in any case.