Cleanup: remove unused imports
Use separate cache backend for stats
Log all messages linked with stats calculation via `stats` logger

related to #3398