simplify the code in updateRecord()

Each metric handles what writer to use and how to use it. When a new metric is added, all we have to do is have the metric declare what writer to use and how to use it. (Like the way we did with RecordFilter and RecordReader)