[ENG-9905](https://linear.app/comm/issue/ENG-9905/update-secondary-device-login-to-match-whitepaper).
Currently, updating the 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 create one call that matches 5.3 from the whitepaper:
{F3307435}
This is not fully correct yet, we need to change to order to first send the 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, bad for readability 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 the middle of the stack protocol is not working, it needs to be reviewed as a whole.