Rationale: Presently, if a socket has data pending when disconnect is called, ae.net.asockets will wait until all data has been actually sent before calling disconnectHandler and closing the connection. This is problematic in practice, as the obvious place to add connection de-registration code is the disconnectHandler, which can cause applications to not unregister connections and related resources for a while after disconnect is called. This behavior is not useful, because after disconnect is called, the application can't do anything to a connection (no data will be received, and calling send is forbidden). Unless the application is careful in treating disconnecting sockets specially, this can in turn result in bugs, such as e.g. in multiplayer games, kicking a player would not cause that player to disappear from the player list immediately, and attempting to relay a chat message to all players would attempt to send data to a disconnecting socket, which would crash the application with an assertion failure ("Attempting to send on a disconnecting socket"). This commit makes disconnect always call onDisconnect immediately (instead of calling it when all data has been flushed). Applications can still be notified when the connection has actually been closed by registering a BufferFlushed handler. The "connected" property is now also false during the "disconnecting" phase. As a result, "connected" and "disconnecting" are now mutually exclusive, instead of "disconnecting" implying "connected". Additionally, it is now forbidden to attempt to disconnect on a disconnected socket.
…o constructors" This reverts commit 6c4fd2c.