Ported libprocess system/stats.json endpoint to new metrics library.

Review: https://reviews.apache.org/r/19545