Reduce ThreadedFileWriter wakeups.

Fixes #11250. If there isn't enough data to actually bother writing
it to disk don't wake up the writer thread.