Removes non-DateTime metric APIs from State.
Changes MetricInterval to use DateTime.
Fixes DOM exception caused by HtmlWriter.writeGridJavaScript.