Enable caching of classes.

Add parameter to configuration to enable caching.
Use kernel.cache_dir in services.yml to cache dir.
Enable caching during the tests.
Enable cahing in AccessManager.php if $parameters['caching'] is true.