[TASK] Separate ext:statictemplates code from core

The three menu types GMENU_LAYERS GMENU_FOLDOUT and TMENU_LAYERS use
javascript files of statictemplates and belongs to the extension.
Using the new factory of issue #46292, those three menu objects are
now transferred to statictemplates extension.

For upgrade to TYPO3 CMS 4.5 an ugrade wizard was created to install
statictemplates system extension if the database tables was in use.
Everything before 4.5 is out of support for a long time, so we can
expect the extension to be already loaded if it is used. The old
upgrade wizard is removed now.

Some statictemplates specific code in ext:tstemplate is substituted
with hooks, used by statictemplates.

Change-Id: Id14dca12f09051c3003fedaeb971fef457f7a17e
Resolves: #46358
Related: #46292
Releases: 6.1
Reviewed-on: https://review.typo3.org/18974
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn