Return document for aggregation result

Max agg is designed for use in a context which would prevent it from making use of any such pre-computed global max values - see Very slow aggregation performance for trivial aggs - #2 by Mark_Harwood