Cherry-picked from branch: permission-flag-definition-foundation
Original PR: https://github.com/twentyhq/twenty/pull/20377 (split into focused PRs)
This PR (foundation):
- Renames old permissionFlag table (the per-role grant) to permissionFlagGrant
- Adds new permissionFlag syncable metadata entity (the catalog of available flags)
- Resolver mutations gated behind IS_CUSTOM_PERMISSION_FLAGS_ENABLED feature flag
- Full flat-entity machinery (validators, action handlers, caches) for both types
- Propagates rename through frontend, SDK, docs, example apps
- Adds integration tests for catalog CRUD (following command-menu-item pattern)
Follow-up PR (stacked): standard permissionFlag seed + backfill workspace command.