[BUGFIX] Crash after file upload on Windows without finfo

This patch checks if the finfo extension is available before using it
to determine the MIME type of a file.
If it is not available, the old function mime_content_type is used as
fallback.
When none of them are available, we give up.

This fixes a crash on Windows after uploading a file, since finfo
is by default not installed on PHP windows distributions.

Change-Id: I53a0eef3ee839c17ddaaeb303b9a0b9bae3ee485
Fixes: #37440
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/17466
Reviewed-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn