[lib] Update permissionsToBitmask to permissionsToBitmaskHex
Summary:
Summmary:
Was initially planning (and drafting) to encode the BigInt as base64 to be included in stringified JSON. However, as I jotted down (ENG-5373 : Use "bitmask" approach to encoding ThreadPermissions and Role permissions blobs), decided to encode as hex instead.
Update permissionsToBitmask and corresponding hasPermission to return and accept string instead of bigint.
Test Plan: Unit test, will add a few more.
Reviewers: ashoat, ginsu, tomek, rohan
Reviewed By: tomek
Subscribers: wyilio
Differential Revision: https://phab.comm.dev/D9589