Ported some of the master stats to the new metrics library.

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