core statistics: revert to safe allocations

Commit 42c3d383 is incomplete since some statistics are allocated
in multi-process environments (e.g. udp/tcp load statistics)

This patch fixes this issue, while maintaining the logic behind 42c3d383
(cherry picked from commit b54afe38bb869cca1c061a1db17abc4869d708c2)