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

related to #3398
Use default cache if stats cache backend is not configured
Stats cache: change way how obsoletes are handled

- clear cache when making stores and directories obsolete;
- re-init cache after store or directory is resurrected;

Cache size will not grow. There will not be any inconsistency when
cache is recalculated fully (obsoletes are not recalculated).
Reports: use accurate (not rounded) values for paid task amount
Cleanup: no need for extra parameter
Fix bug introduced in fb3738f

`new_value` field is not null, save empty string instead.
Related to #3376
Editor: avoid name clash
Cleanup: readability
Cleanup: removed dead param
Editor: made messages more flexible

Not that I'm proud of this but the box needs to be adaptable to display
the close button conditionally.
Cleanup: minor reorganization
Editor: prevent working on units from obsolete stores

Fixes #3322.
Reports: added missing semicolon
Reports: fixed bogus comparison
Cleanup: removed dead code
Use iterator() and don't allow to grow the QS cache
Editor msg: handle default opts
Editor: prevent working on obsolete units

Follow-up of #3322, which only prevent working on units from obsolete
stores, not obsolete units from non-obsolete stores.