[CommCoreModule] Move runSyncOrThrowJSError to a separate file
Summary:
Currently working on reducing code duplication and cleanup in this file. So I will need to use this function in different places as well as here (for functions like getAllMessagesSync).
It's easy util, so I prefer to keep this in .h file.
Test Plan: Build iOS and Android
Reviewers: michal, jon, atul, tomek
Reviewed By: michal, atul
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D8601