Make buffer-flushes interruptible, incidentally protecting them from stray SIGCHLDs.

I had another test I really wanted to add, but it's too easy to hit #215, and replay is too slow because of #184.  The latter is definitely becoming a major annoyance.

Resolves #123.