use less memory in top children query

Closes https://github.com/elasticsearch/elasticsearch/issues/8160