XEP-0198 support.
Partial implementation of outgoing XEP-0198 stream management.

Clean up formatting.
Prefer non-text stream errors

These are more informative.
Do not notify connectionClosed listeners on quickShutdown.

Previous version had a race condition.  The roster was notified of connection closed rather than connection error. This winner depended on whether the socket close caused an IO error first, or shutdown on PacketReader was called first.
Fix authenticated flag false after SM resume.

Causing roster management to fail.
quickShutdown on PacketReader error.

We don't want unavail presence to be sent or otherwise lose state that we need to reconnect.
XEP-0198: prevent binding of null resource