OF-2752: Refactor solution
In the previous commit for this issue, it was assumed that the state of a connection was always known 'good' or 'terminated'. In reality, there are lenghty periods in which Openfire cannot be sure of a connection is terminated, or simply unresponsive.
To avoid clients being disconnected by Openfire without their knowledge, Openfire should always try to send an end-of-stream indication. Without this, clients might assume for indefinite amounts of time that they're connected, while they are not.
OF-2752: Sessions should be resumable only if closed due to 'unclean' disconnect
Prior to this commit, a session was (stream management) resumable whenever it got closed.
When a session is closed 'cleanly' (eg, with an exchange of `</stream>`), then a session should never be resumed.
This commit attempts to reverse the strategy. It is implied that a session is never resumable, unless it is closed unexpectedly (for example, as caused by a network disconnect).