DOCS-974 min and null values in agg
DOCS-1105 sort w limit and other optimization
DOCS-1070 geoNear
merge: DOCS-974 and DOCS-1105
merge: DOCS-1070