[SPARK-2873] use ExternalAppendOnlyMap to resolve aggregate's OOM
Merge branch 'sql-memory-patch' of https://github.com/guowei2/spark into sql-memory-patch
[SPARK-2873] use ExternalAppendOnlyMap to resolve aggregate's OOM