Pipe: when replacing a pipe, wait until it's not fast_dispatching

It could be that we grab the lock while the existing pipe is fast_dispatching
and then proceed to dispatch messages ourself, beating it. Instead, wait for
the other pipe. Add a "reader_dispatching" member which tells us this is
happening, and when re-locking, signal the cond if we're shutting down.

Signed-off-by: Greg Farnum <greg@inktank.com>