AMBARI-7680. Implement the Metric Collector using ATS. Changed to incorporate PHOENIX-914. Fix unit tests. (swagle)