[TASK] Clone RestTools if possible

Change-Id: If4861e237dd96df0dea09aa7031254b0a5457488
Resolves: #58052
Reviewed-on: https://review.typo3.org/29576
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers