Aggregations

TermAggregation - added methods setSize and setShradSize 
@see http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-aggregations-bucket-terms-aggregation.html#_size_amp_shard_size

GlobalAggregation - there was a bug here - now a JSON with a global aggregation looks like this

    "aggs": {
        "global": {
            "global": [
            ]
        }
    }

The global key should be "global": {} not "global": [] - this is because empty array is returned in JSON as [] but this cause ES to not return global aggregation at all in the result set.

Changed to array('global' => new \strClass); as global aggregation is always empty

    "aggs": {
        "global": {
            "global": {
            }
        }
    }

Elastica/ResultSet - added method hasAggregations - to check if any aggregations where returned.