[web/native/lib] Use message pruner on web
Summary:
ENG-3475 : Implement message pruner for the web
Now that messages will be persisted on web we should prun them occasionaly. This moves MessageStorePruner, nextMessagePruneTimeSelector and pruneThreadIDsSelector from native to lib and removes the platform-specific code, which now lives in native/web.
Also fixes an issue mentioned in this comment by ignoring threads with less than 20 messages in nextMessagePruneTimeSelector.
Depends on D11544
Test Plan: Change the msInHour constant to a lower value so pruning happens more often. Test on both web and native that the threads with <20 messages get pruned. Test that this doesn't cause issues on web (e.g. the messages can still be fetched from keyserver).
Reviewers: atul, kamil, marcin
Reviewed By: atul, kamil
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D11545