move active metrics to lookup type

This consolidate a bunch of code into a single place.  This also fixes a
bug where we were sometimes forgetting to add a new metric in Set().