Unbinds and detaches socket regardless of origin of disconnection

If the server initiates the disconnection, we should still clean up event bindings and reset the connection property, or the client instance will be in a broken state.