[lib] Add hook to broadcast Olm-encrypted messages
Summary:
Address feedback from https://phab.comm.dev/D12944?id=43066#inline-75283
Extracted sending Olm messages (and optional session creation) to a hook.
It is used in a few places, which are updated in subsequent diffs
Test Plan: Flow. Logic tested in later diffs
Reviewers: kamil
Reviewed By: kamil
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D12995