client: factor out connect and disconnect events
Fix incorrect loop bounds in World destructor
Reset world when connecting to a server