Generate distributional data not averages.

Value-counts can be summed out, totalled and averaged so is generally
more useful that a precalculated summary statistic like average.
Move analytics calculations entirely porter side.
Merge pull request #1212 from guardian/kpis

Move analytics calculations entirely porter side.