Analytics counter improvement

The extraction of the value for analytics counter is a bit awkward. The design is made for the way NodeBB displays the stats. It would be nice if every counter is just held in memory and provided via an API. Since it is held in memory it would reset with a restart but that is fine for external tools like Prometheus.

This would be really easy to implement, make it easier to export counters and increase performance, since no database request would be needed for those counters while scraping.

Edited by Florian Graf