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?
Use internal methods instead such as `$c->getFoo()`

I dislike the `query` thing because you cannot just simply click on it and jump to the code…