[lib] add session version to EncryptedData
Summary:
ENG-6982.
When there are multiple messages queued for the device, and we start resetting the session the messages already queued will for sure fail to be decrypted - to distinguish that and avoid resetting the session multiple times we need to add the session version to each message. This is optional to backward compatibility and to avoid adding this for notif when this is not needed.
Depends on D13032
Test Plan:
- Create a session between devices A and B
- On B comment out sending confirmation.
- Send some messages from A to B
- Receive couple of messages from B
- Reset session
- Make sure other messages throws INVALID_SESSION_VERSION error when decrypting
Reviewers: tomek, marcin
Reviewed By: tomek, marcin
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D13033