Use github.com/dlmiddlecote/sqlstats to collect db metrics
The current database metrics collection is clumsy while there is a perfectly adequate library that does the job simply and efficiently. We should use it.
Note that it will change the database metric names, so make sure to document it in the release notes.