Synchronize all sends, even when closed.

When sending close-ok initiated by a channel exception, wait for all
content frames to be delivered before sending close-ok.

Fixes #46