elasticsearch: Clear tool output before indexing

This is both huge, and difficult to normalize for Elasticsearch.

Fixes #7038
It actually modifies it in-place, now that you mention it, which is not what it implies right now. Not really worth doing a deep-copy for this, so I'll just document that it modifies it in-place (and remove the return).