Downsample before and after aggregation.

Supported downsampling aggregated results.
- Optional pre-downsampling query param is applied to the downsampling before
  aggregation. The query parameters should end with "-pre" like "1h-avg-pre".
  The default pre-downsampling could be applied if not specified.
- Optional post-downsampling query param is applied to the downsampling after
  aggregation. It uses the existing downsampling query param syntax.
  No post-downsampling will happen if not specified.
- The 0 second downsampling interval turns off the corresponding downsampling
  explicitly.
- A query to aggregate CPU metrics of the last hour with 10s
  pre-downsampling and 1 hour post-downsampling would be like:
    "/api/query?start=1h-ago&m=sum:10s-avg-pre:1h-avg:rate:sys.cpu.0"