Cleanup usages of the global config.Config variable
The change removes usages of the global config.Config variable from production code.
It doesn't address all usages as they will be resolved in other MRs.
In most cases usages replaced with usage of the Cfg instance injected into struct or passed as a parameter to the call.
Part of: #2699 (closed)