This function will allow us to go from permissionBitmaskHex "back" to ThreadPermissionsInfo.
NOTE: Once we've made all the necessary changes on native we'll be able to remove this function altogether and use hasPermission(permissionsBitmaskHex:string, permission:ThreadPermission) instead. This is for incremental step where we send encoded permissions to native and web clients and IMMEDIATELY decode back to ThreadPermissionsInfo and ThreadRolePermissionsBlob. The diffs immediately after that will handle refactoring clients so we can "query" the minimal encoding directly.
Next diffs:
- Higher level utilities for translating back/forth from RawThreadInfo <=> MinimallyEncodedRawThreadInfo
- Native refactoring + migrations
- Web refactoring
- Flipping the switch