[SQLite] Introduce getRelatedMessages
Summary:
I'm modelling this stack after @kamil's recent one (see D12080) that introduced functions to SQLiteAPI. First I'm introducing the shared SQLite C++ code, and then I will introduce the layers on native and web that will interact with it. This diff also contains some web-specific customizations necessary on the SQLite C++ code.
This query will be used for:
- Querying for a sidebar source's latest edit at sidebar creation time (ENG-8788)
- Querying for a messages edits and reactions for search results (ENG-87890)
Test Plan:
- In combination with later diffs, I tested a patch on both native and web that hit getRelatedMessages with a specific message ID and confirmed that it returned the message
- I tested a message ID that did not exist and confirmed I got undefined back
Reviewers: kamil, tomek, marcin
Reviewed By: marcin
Differential Revision: https://phab.comm.dev/D12737