[lib] Check the timestamps when adding the viewer to thread members
Summary:
Check the timestamp and update the membership only when necessary.
https://linear.app/comm/issue/ENG-9114/update-addviewertothreadmembersspec
Depends on D13217
Test Plan: Created two add_viewer_to_thread_members operations and checked if the resulting timestamps are correct (all the timestamps should equal the first operation time except the membership.role timestamp).
Reviewers: kamil, inka
Reviewed By: inka
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D13218