[ENG-9905](https://linear.app/comm/issue/ENG-9905/update-secondary-device-login-to-match-whitepaper).
Currently, updating device list and broadcasting device list update is easily coupled in the codebase, which makes it hard to maintain, as those two should always be done together. I just wanted to created one call that matches 5.3 from whitepaper:
This is not fully correct yet, we need to change to order to first send device list update to all the peers, but it's not yet possible before [ENG-9769](https://linear.app/comm/issue/ENG-9769/handle-race-condition-between-devicelistupdated-messages-and-identity). Creating TBD to address that.
I am still keeping util functions, which is not fully readable but those are used in unit tests.
Logic should remain mostly unchanged, small changes are annotated with inline comments.
Note:
It's not that easy to slice this into diffs, so it's possible that in the middle of the stack protocol is not working, it needs to be reviewed as a whole.