[lib] Replace threadHasPermission with useThreadHasPermission in useCanEditMessage
Summary:
Similar to D11791, but for useCanEditMessage.
Depends on D11792
Test Plan: flow + close reading
Reviewers: ashoat, ginsu, tomek, varun
Reviewed By: ashoat
Differential Revision: https://phab.comm.dev/D11816