Fix log not always showing up when `--dynamic-ui` is set (#10616)
Fix log not always showing up when `--dynamic-ui` is set (#10616)

### Problem

Closes https://github.com/pantsbuild/pants/issues/10537. 

### Solution

This seems to have been caused by the fact that the WorkunitStore, which is responsible for printing the "Completed: " log messages when a workunit completes, was previously doing this in HeavyHitters code if `--dynamic-ui` was true, but doing it outside that code if it was false. The HeavyHitters code is periodically called by the dynamic UI code, meaning that it won't be called after the dynamic UI shuts down. This means that it's possible for the last workunits completed by the WorkunitStore to have their completion log messages not printed, because the code that would've printed them is never called because the dynamic UI has already shut down.

The solution to this is to simply print the log message outside of the HeavyHitters code, like the WorkunitStore is already doing in the `--no-dynamic-ui` case.

pantsbuild/pants,pantsbuild/pants,benjyw/pants,benjyw/pants,benjyw/pants,pantsbuild/pants,jsirois/pants,benjyw/pants,benjyw/pants,pantsbuild/pants,pantsbuild/pants,benjyw/pants,jsirois/pants,benjyw/pants,pantsbuild/pants,jsirois/pants,pantsbuild/pants