[TASK] Enable mock of ResourceFactory in ContentObjectRenderer

ext:frontend ContentObjectRenderer calls ResourceFactory::getInstance
at various places. This static call can not be mocked and is a hard
dependency to FAL.
The patch encapsulates the static call in a method and uses this
to mock instances of the ResourceFactory within some tests to have
controlled return values.
As a side effect one test does not fail anymore if only the
ext:frontend tests are executed and not the whole test suite. The
according hook-test was renamed and now tests the method that calls
the hook directly.

Change-Id: I0ee75462b7e7f25f70c6c8fb132045084b9ac537
Resolves: #52868
Resolves: #52643
Releases: 6.2
Reviewed-on: https://review.typo3.org/24821
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn