[keyserver] Extend link creation logic to support invite links to threads
Summary:
Check if the viewer can manage links in a thread (all the permissions pass for a script viewer). Modify the SQL scripts so that new columns are populated.
Didn't change the response from the server because we don't plan to create thread invite links from clients, and we can cut the complexity here (we don't need to deal with old clients).
https://linear.app/comm/issue/ENG-8387/modify-link-creation-logic-to-support-links-to-threads
Depends on D12351
Test Plan: Checked if creating and editing community links still work. Created a script which creates a thread link and checked if it works correctly - making this script work required some hacks https://linear.app/comm/issue/ENG-8390/fix-creating-invite-links-from-scrips.
Reviewers: inka, ginsu
Reviewed By: ginsu
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D12354