Start the ability to calculate quartiles
Fix errors when requesting multiple stats.

* Clean up the reduction code a bit by introducing more promises.
Simplify the promises based logic.