[lib] introduce message searching to SQLiteAPI
Summary:
This diff introduces a shared interface on SQLiteAPI so the JS code in lib can use this API on both platforms.
Depends on D12853
Test Plan: Tested later in the stack by @inka.
Reviewers: tomek, inka
Reviewed By: tomek
Subscribers: ashoat, inka
Differential Revision: https://phab.comm.dev/D12854