Fix MarshalJSON to follow other writers pattern. Usage: metrics.MarshalJSON(registry)