[keyserver] Extract query for checking the existence of personal thread
Summary:
This part of code has been exctraced in response to comments on D4941 (so it can be reused there)
Function searchForPersonalThread has been written in advance. It executes the query and returns it's result
Test Plan: Like D397
Reviewers: tomek
Reviewed By: tomek
Subscribers: ashoat, atul, abosh
Differential Revision: https://phab.comm.dev/D4977