Fixing broken layout in master due to APC enabled

@karlitschek 
fixes #4620 



The error is raised during the autoloader initialization where e.g. APC is used to cache path information.
Within the ctor of our Cache base class we try to get the instance id.
If the instance id does not exist (because it cannot be read from the config) the code is creating a new instance id and save if back to the config.php - which fails for the obvious reason.

At this point the template system is not initialized and the necessary variable WEBROOT is not yet set.