[lib] Handle truncation case in `mergeNewMessages`
[lib] Handle truncation case in `mergeNewMessages`

Summary:
Should fix this issue: https://www.notion.so/commapp/Message-op-invariants-triggering-with-build-99-df5f0587879e4d08acb93f5f6e807de9

If result set isn't contiguous with what we already have, dump existing messages for thread

Test Plan: haven't yet tested

Reviewers: ashoat, palys-swm

Reviewed By: ashoat

Subscribers: palys-swm, Adrian, karol-bisztyga

Differential Revision: https://phabricator.ashoat.com/D1968

Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal