[TASK] Use CSRF protection throughout Media

CSRF protection must be used for all parts of media that call TYPO3's
mod.php.

Releases: 3.0
Resolves: #58738
Change-Id: I38ee2edb908d0ee4290c79457a7b781ac2b9fcf7
Reviewed-on: https://review.typo3.org/30032
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot