[lib] Extract hook to send logout message to primary device
Summary:
Part of ENG-9710.
We want to send this message not only on secondary device logout, but also on legacy logout when use_new_flow is received
Depends on D14032
Test Plan: Performed secondary device logout. Confirmed that primary device received the message.
Reviewers: kamil, varun
Reviewed By: kamil
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D14033