[lib] Pull filterOutDisabledPermissions(permissionsBitmask) out of getCurrentUser
Summary:
We will need to use this logic at permission check sites (eg threadMemberHasPermission/threadHasPermission/etc). Eventually we'll consolidate so we use one hook for everything, but for now we're going to use this in a couple places so we can first remove usage from getCurrentUser.
Depends on D11741
Test Plan: This is a very simple extract/move diff. flow + careful reading + will be tested implicitly by later diffs in the stack.
Reviewers: ginsu, tomek, varun, will
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D11742