Ensure valid metric names and change statsd metric escaping.