Cleanup config handling - deprecate old ways to interact with config

* deprecate old and static ways to interact with config
* introduce SystemConfig to avoid DI circle (used by database connection  which is itself needed by AllConfig that itself contains the methods to access the config.php which then would need the database connection - did you get it? ;))
* use DI container and use that method in legacy code paths (for easier refactoring later)

fixes #12260 

@PVince81 @Raydiation @DeepDiver1975 @LukasReschke Opinions?
@DeepDiver1975 This is the code path where the SystemConfig is needed. Otherwise app and user config couldn't read from the database. Also see @Raydiation 's comment in the issue, this PR wants to address.