[TASK] Use stat() instead of filemtime + filesize

Calling stat() is cheaper than calling filemtime() AND filesize().

Change-Id: I8fc3cb46d934b3c49f6919f7f178e2b232fd62e1
Resolves: #55574
Releases: 6.2
Reviewed-on: https://review.typo3.org/27256
Reviewed-by: Marcin Sągol
Reviewed-by: Karol Lamparski
Reviewed-by: Michał Jankiewicz
Reviewed-by: Stefan Neufeind
Reviewed-by: Michiel Roos
Tested-by: Michiel Roos
Reviewed-by: Markus Klein
Tested-by: Markus Klein