Fixes json serialization of metrics.

Ensure that a Metric is serialized to the right JSON representation.
Specifically, `name` -> `metric` and converting the `points` tuple to
an array to match the spec.