Initial aggregations support.

Added Global, Filter, and Terms aggregations.