More bug fixing with broken connections and disconnect

This does two things: (a) there was an asymmetry in the ClientSession
state machine with how client-side disconnects were handled.  The
DISCONNECTING state was used in some code paths and not in others.
Analysis shows it's unnecessary.  All client-side disconnects immed.
transition to BROKEN.

(b) Flushing pending commands in the replay queue was being determined
by the remote close reason.  This is insufficient in the case of BYE
because it's a non-error close but, because it's initiated by the
server, pending commands should not be flushed.  An additional close
flag deals with this case.