Smarter timeout_ms in mg_poll_websocket()