Refactor stats into its own enum class

### Problem

We are hard-coding stats query like "average", "numPoints", and etc. at several different places. This makes the code harder to maintain.

### Solution
Refactored these stats into an inner enum class called MetricStat.