[lib] Avoid directly mutating MessageStore in messageStorePruneActionType
Summary: I noticed that this code was directly mutating the objects in the MessageStore instead of treating them as immutable. This makes it impossible for selectors to notice changes and update components that are watching the MessageStore, and thus is considered bad practice. This diff updates the code to avoid mutating the objects directly.
Test Plan: Flow, careful reading
Reviewers: palys-swm
Reviewed By: palys-swm
Subscribers: KatPo, zrebcu411, Adrian, atul, subnub
Differential Revision: https://phabricator.ashoat.com/D915