[lib] Update threadHasPermission to "go through" permissionLookup
Summary:
Update threadHasPermission to "go through" permissionLookup for checking permissions rather than indexing into threadInfo.currentUser.permission directly.
This ensures that behavior of threadHasPermission matches permissionLookup. Specifically, to ensure that the KNOW_OF permission is also true in addition to whatever permission is being checked. This will also ensure that in the future we only need to add conditions in "one place."
Depends on D9844
Test Plan: Close reading/flow, don't think we need a unit test for this...
Reviewers: ashoat, ginsu, rohan, tomek
Reviewed By: ashoat
Differential Revision: https://phab.comm.dev/D9845