[BUGFIX] uploading extname_1.0.3 (1).zip creates extension "extname (1)"

The function getExtensionFromZipFile fails to sanitize any output after
the version. As the function is only interested in the part before the
version which must be the extension key, remove any trailing characters.

Add a unit test to document this behavior.

Resolves: #48332
Releases: 6.2, 6.1, 6.0
Change-Id: I09b810d4bce214b6fa38e1a62200560f30d88984
Reviewed-on: https://review.typo3.org/21078
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters