Change the FrontendMetric api so that failed metrics can be put back
Change getDataPoints to getAndResetDataPoints
Add asyncHandlerForMetric that puts the datapoints back into the metric
if there has been a failure
Move for comprehension for dataPoint into withMetricData
Use new asyncHandlerForMetric