[TASK] Refactor extension upload controller

The upload and install functions are needed by the extension coreapi.
In order to support the extension, the UploadExtensionFileController
is refactored and necessary functions are extracted to public functions.

Resolves: #59999
Releases: 6.2, 6.3
Change-Id: I21e734d1ecae2e7c8e7c3f72e129ef1f57532886
Reviewed-on: https://review.typo3.org/31250
Reviewed-by: Stefano Kowalke
Tested-by: Stefano Kowalke
Reviewed-by: Marcin Sągol
Reviewed-by: Markus Klein
Tested-by: Markus Klein