DM: dm.json can be missing some final results

We called JsonWriter::DumpJson() every once in a while,
but this did not necssarily wait for offloaded PNG encoding to finish.

This means we might have been dropping some DM results for a while now.
Fix by one more JsonWriter::DumpJson() call after joining back to the
main thread.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744723002

Review URL: https://codereview.chromium.org/1744723002
1 file changed