Aggregations: Merge LongTermsAggregator and DoubleTermsAggregator.

These two aggregators basically do exactly the same thing, they just interpret
bytes differently. This refactoring found an (unreleased) bug in the long terms
aggregator which didn't work correctly with duplicate values.

Close #7279