[FEATURE] Implemented caching framework for performance boost

Implemented file cache for 404 pages.
Removed old XCLASS code, since its not used anymore in v6.
Added closing tag of php in FrontendHook.