do not depend on session to render error templates

this removes the dependency on a session to render templates. fixes rendering error pages when config.php is not writeable. see https://github.com/owncloud/core/pull/3560