[lib, native] Introduce getThreadListSearchResults function for common web and mobile thread list logic
Summary: Introduced function for common thread list filtering logic, so it could be used also in web app.
Test Plan: Search on mobile app works correctly - exactly as before.
Reviewers: palys-swm, atul, benschac, ashoat
Reviewed By: palys-swm, benschac, ashoat
Subscribers: ashoat, Adrian, atul, karol-bisztyga
Differential Revision: https://phabricator.ashoat.com/D2885