simplify the logic of distinct
flush the aggregator state as soon as the next bucket start
Merge pull request #451 from influxdb/calculate-summaries

Calculate summaries instead of storing all points in memory