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?
Otherwise we can't resolve the circle dependency. And otherwise we can't make use of injected dependencies for our core classes and can't unit test them.