merged Aggregation support from the latest official elastic.js