Separate Metrics struct from Master class.

Review: https://reviews.apache.org/r/27744/
Introduced mutex configure check in libprocess.

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