[lib] fix useThreadSearchIndex to avoid ignoring private thread
Summary:
ENG-9378.
This code was ignoring private threads and as a result, causing that private thread not to show up.
On prod, it works only for old users where by default thread name was the user's name, after changing the name in settings it is not working anymore. Right now, when creating an account name is not set for the private thread, it's an optional field and not set to own username - that is why this is not working for dev where we have new users.
Test Plan: Searching for my username works (even if I changed name of my private thread).
Reviewers: tomek, ashoat
Reviewed By: ashoat
Differential Revision: https://phab.comm.dev/D13461