Separate Metrics struct from Master class.

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