Run flush_pending_log_callbacks() on an as-needed basis, not once-per-second

This is likely to be trickier than a bunch of the other removals from our once-per-second code, since the logic to activate this event can happen from non-main threads.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information