Add group by statistics examples in API v2 docs

Fixes bug #1224222

There are currently no examples in the API v2 documentation that
show the user how to request statistics with the groupby parameter.
This patch adds examples and explains that period aggregation is
applied before group by aggregation.

Change-Id: I5561c4397d124e2976771b3a3b14d666a611351e
Merge "Add group by statistics examples in API v2 docs"