Closes the connection by setting presence to unavailable then closing the connection to the XMPP server. The Connection can still be used for connecting to the server again.
This method cleans up all resources used by the connection. Therefore, the roster, listeners and other stateful objects cannot be re-used by simply calling connect() on this connection again. This is unlike the behavior during unexpected disconnects (and subsequent connections). In that case, all state is preserved to allow for more seamless error recovery.