Add functions to schema and drop unique index
Add resolution and function as query params to metrics/{key}
Add custom functions max, min, perc, median
Add Median and Fix aggregation test