If the alarm metric unit is present make sure it is written back.

Previously, this code would only write the unit if the metric was defined in the static METRICS array. Perversely, it would still write back the MetricName whether the metric was present in METRICS or not. It would just eliminate the unit. I've changed it so that the unit, if present, is written back.