When a web client disconnects, the associated QWebSocket object is deleted via WebServer::socketDisconnected. So far this happens by immediately calling the destructor (as we release the unique_ptr from the m_clients list).
However, the QWebSocket may still be needed in the Qt event loop at this time, so the event loop will crash on the next iteration. We have to call QObject::deleteLater(), instead.
Since the *only* purpose of WebServer::m_clients is to manage the lifetime of QWebSocket instances, we can also rewrite this in a more concise an readable way.