Part of [ENG-10186](https://linear.app/comm/issue/ENG-10186/primary-device-unable-to-add-secondary-device-adding-device-failed#comment-f452eecd) and overall improvement.
There are a couple places in codebase where we try to send message and it could fail with `Tunnelbroker not connected` but only because using outdated or not yet re-rendered version of `sendMessage`, example:
1. There is an asynchronous `useCallback` which is doing a lot of things, and after calls `sendMessage`, it starts it execution when Tunnelbroker is disconnected.
2. During execution, socket connection is established
3. In callback mentioned above, `sendMessage` is called but it fail because it is bound to old `socketState` even though socket is connected. This diff fixes this.
Not sure if this isn't too hacky, curious for alternatives. We still want to keep the state to return it and allow add it to dependency where needed.