By using a hash instead of the issue number as array key, no file gets
lost any longer due to collision. Same issue numbers for documentation
files are quite common, e.g. when a new feature deprecates replaced code.

PageRepository ($TSFE->sys_page) has an init() function, which sets
some public properties, but is also called from the constructor.

However, there is the ominous $TSFE->setSysPageWhereClause()
which can only be set once the frontend user groups have been resolved.

In order to achieve that, the usergroup initialization within TSFE has
been moved before the intantiation of $TSFE->sys_page, allowing the
pagerepository constructor to set the variables directly, moving all
of the initialization code into PageRepository itself.

TemplateService in TYPO3 frontend is responsible for
fetching sys_template records and sorting TypoScript
related things out, but also contains one method,
which is nowadays completely separate from
sys_template: "getFileName".

This method checks for valid syntax and returns
a proper string then (resolves "EXT:... syntax"
and valdiates against available paths).

The logic is frontend-related, thus moved
to EXT:frontend/FilePathSanitizer.

The old functionality in TemplateService is
deprecated, along with the public property "fileCache".

Due to the introduction of Contexts, it is now possible
for Extbase to use the global context and to modify
it to set up a new instance of "PageRepository"
with just a context initialized. This way,
dependencies to $BE_USER and $TSFE->sys_page
are removed.

In further steps, the method should actually just work
with the context object which should be handed in,
however, some more work regarding language handling
has to be implemented first.

After PATH_site usages have been dropped, this patch drops
the other path related constants PATH_typo3 and PATH_typo3conf.

Next steps (out of scope for this patch):
- Make typo3conf/l10n/ flexible (= var/labels)
- Move PackageStates and autoload/autoload-tests into typo3conf/ext/typo3/
- Analyze usages of "typo3conf" and "typo3/sysext" strings currently hardcoded

For now the Context is a singleton object, but should
be fetched from a DI container.

Sometimes a custom context is necessary, so it is
cloned (see usage in TSFE).

The difference to the PSR-7 request attributes is that the
context is ONLY related to data access (like permissions / visibility)
and also independent if TYPO3 is running via HTTP or CLI
(thus, can be used in CLI mode as well).

The docs team is working on a new docs.typo3.org rendering
chain that can come with some new long awaited features.
One blocker is the core internal documentation extension
that needs various hard to maintain resources from
docs.typo3.org.

The suggested solution was to drop the backend inline
manual fetching and display and thus obsolete the
extension.

For v8 and below, the 'latest' state of the various
json, xml and zip files the extension relies on, will
be frozen by the docs team to not break the module.

The documentation extension has various flaws, it for
instance tends to download outdated manual versions, the
acceptance within the community is not very high
and people are used to look up latest docs online.

The patch drops ext:documentation from the core to
free up the docs team from maintaining the clumsy
requirements at some point in time entirely.

As proposed here https://decisions.typo3.org/t/reduce-size-of-extension-manager-db-table/329/
the EM only imports entries into the database from
TER that are uploaded from 2015-11-10 on, reducing
the database table size by 2/3.

As long as extensions.xml from TER does not
restrict this (e.g. by version) this reduces
import time when updating the extension list
and search handling within the Extension Manager.

The core and documentation team decided to drop the inline
manual view from core for various reasons that will be further
outlined with a second patch.

The documentation extension currently does both the manual
display, and also the "csh" rendering. The latter has been
merged from ext:cshmanual into ext:documentation quite
recently with core version v9.0.

The patch extracts this csh handling from ext:documentation
again and puts it into ext:backend. The patch is similar to
the v9.0 patch, only slight additions are applied along the way.
This changes also unmarks the documentation extension from
"partOfMinimalUsableSystem" since the direct dependency of
ext:backend to ext:documentation is gone with the csh merge
into backend extension.

The PdoHelper class with its single method importSql() has
been added for the Pdo cache backend which is also still
the only usage of that helper class.
With the migration to doctrine, that class feels misplaced
and obsolete. The code is moved over as protected method
into Pdo cache backend directly and the PdoHelper class
is marked as deprecated.

- Always check for existing response
- If HEAD request fails, a GET request should always be triggered
- Restructured, moved some local variables to class variables
- In case of redirect loop, output exception message instead of
location and status code

Avoid persisting the IP address of a login action twice and just use
the one of the IP field.

Additionally the anoymize scheduler task can now remove all unwanted IP
addresses from the logs.

Be aware that the anonymization of the sys_log entries only
works for new entries that were generated after this patch. Older
entries have to be deleted or the details field needs to be
cleared manually.

When entering the Install Tool and the GFX/processor is set to
GraphicsMagick the value for GFX/processor_effects is reset to -1,
overwriting any value that might have been set before.
Also adjust tests for the new expectations.

[BUGFIX] Language selector not shown in default page without translation

When editing a page, the language selector in the upper left corner is
not visible when the page is in the default language and does not have a
translation yet. When the page has at least one translation, the language
selector is visible, which is inconsistent behaviour.

This patch adds a check for the table. When the languages for the page
table are fetched, all languages are fetched.

The "ready to publish" workspace state has the internal negative
identifier -10 which is not supported anymore since system fields
are auto-generated and t3ver_stage defined to be of type unsigned
(positive) integer.

The "Simulate user" functionality of the "User settings"
module for backend admins is UX wise a distaster: This
functionality is hidden behind the settings of the currently
logged-in backend user in the toolbar, which then magically
allows to change foreign user settings.

A much better approach to administrate user settings of other
users is to fully switch to the target user using the
"Backend User" module.

Additionally, if an admin user changes specific user settings of
existing or new users over and over again (eg. backend language),
sane defaults should be configured via User TSconfig "setup."
instead.

Due to the removal of "pages_language_overlay", the page IDs for
FormEngine's suggest wizard contains page IDs of all languages, however
it is defined that the "pid" field is only limited to the default language.

Adding a check for `sys_language_uid=0` ensures that the pid IN
query is much smaller than before.