[TASK] Do not hook into EXT:documentation if unconfigured

Change-Id: Ic1839a65dee68e781cf8fb167933984c63eb505b
Resolves: #52722
Reviewed-on: https://review.typo3.org/24625
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers