introduce PersistentUnitCacheDir

Refactors PersistentUnitCache to move all I/O operations on files or
directories to PersistentUnitCacheDir.

Also,
  - inline a couple of tasks that are only called once.
  - add better logging to the unit tests.

Change-Id: I62d2b2f105c898d8053e74fb11f0d15445f3856d
Review-Link: https://gwt-review.googlesource.com/#/c/10310/