MDL-40903 cache: converted persistent into persistentdata

At the same time all cache instances were made persistent
MDL-40903 cache: coding style tidyup pre-integration