[BUGFIX] TS is fetched from cache incorrectly sometimes

If $TYPO3_CONF_VARS['FE']['defaultTypoScript_constants'] or
$TYPO3_CONF_VARS['FE']['defaultTypoScript_setup'] are set through
the PHP code, cached TS will not be found in cache. This would
result in TS parsing every time when there are USER_INT objects
on the page. It may slow down the page with USER_INT objects
by about 300% comparing to the cached version.

This change is re-added after it got reverted due to lack of reviews in
Ia0fd65a35897c71d60c48c0b03098ce67ad16c70.

Change-Id: Ief3a065451644423b236489729716b906f3d4500
Resolves: #43540
Releases: 4.5, 4.7, 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/24178
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert