[lib] Move message update reducer into specs
Summary:
Use a similar approach to the original one, which is based on mutating the result while iterating the array.
Depends on D9318
https://linear.app/comm/issue/ENG-4241/handle-processupdatesactiontype-as-a-part-of-a-spec
Test Plan: Check if the new code produces the same result os the old one.
Reviewers: kamil, bartek, inka
Reviewed By: kamil
Subscribers: ashoat, michal
Differential Revision: https://phab.comm.dev/D9319