[BUGFIX] Folder structure honors file and folderCreateMask

The folder structure class construct takes care of permissions
of files and folders. The patch adds support for config values
fileCreateMask and folderCreateMask.

Resolves: #49715
Related: #49162
Releases: 6.2

Change-Id: I9f41ba7f038992ef77cf212229fca524e346431f
Reviewed-on: https://review.typo3.org/21971
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[FEATURE] Add meta info to the FAL IRRE element header

Implement the UX-Team functionility of the FAL IRRE element header via a
label_userFunc in the sys_file_reference. Furthermore add a
configuration in the ctrl-section of the sys_file_reference TCA to
support additional fields in the output of the header.
This can be used by any extension.

Resolves: #36052
Releases: 6.2
Change-Id: I7770044c11a6c1a1bcb51a3bfc11b85923653196
Reviewed-on: https://review.typo3.org/21916
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
[BUGFIX] Support mysql socket connection

With the switch to mysqli in 6.1, the connection to mysql server via
socket broke.

With mysqli, the definition is now:
* If hostname is "localhost", a socket is used and the socket file
can be given optionally if it is different from the default.
* If hostname is not "localhost" but an IP address, a port can be
given that may be different from the default mysql 3306.

The patch now reflects this in the database connect step and adds a
parameter for the optional socket location. The patch will be adapted
for 6.1 to include only the additional optional socket parameter.

Resolves: #48117
Related: #49162
Releases: 6.2, 6.1
Change-Id: I968a72dbaf90b3f319c03e697137630534d325c1
Reviewed-on: https://review.typo3.org/20933
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Markus Klein
Tested-by: Markus Klein