[TASK] #33223 Check TYPO3 6.2 compatibility

- Add utility class for retrieving the TYPO3 version number
- Use appropriate query settings (based on TYPO3 version)
- Use Extbase logics to update the redirect counter instead of a custom SQL query; this fixes a PHP Fatal Error with TYPO3 6.x
- Do not assume EXT:nc_staticfilecache to be installed, instead check if it is available. This is not strictly related to TYPO3 6.2, but already caused issues in other projects.
[TASK] #33225: Migrate db unit tests to TYPO3 functional tests

- Apply coding guidelines
- All tests are based on the core's FunctionalTestCase now
- Add fixtures for test data instead of creating it using PHP code
- Use namespaces for tests (this intentionally breaks compatibility with TYPO3 4.x)