[lib] Introduce rolePermissionToBitmaskHex
Summary:
Introduce rolePermissionToBitmaskHex which turns threadRolePermission string into hex-encoded bitmask.
Context: https://linear.app/comm/issue/ENG-5388/encodepermissions-for-rolepermissionsblob
Test Plan: Unit tests, more testing in upcoming diff which handles decoding back to rolePermissionString
Reviewers: ashoat, ginsu, tomek, rohan
Reviewed By: ashoat
Subscribers: wyilio
Differential Revision: https://phab.comm.dev/D9662