Fix flakiness in PersistentUnitCacheTest

The cleanup() method starts rotating in the background.
This resulted in a race with the test, which immediately
checks how many files there are. Usually the test
would win the race, but not always.

Fixed by making rotation synchronous in the test.

Change-Id: Id1d0dbb3d20e2b4e832084fe4a79c5a003401d92