[connection] move hook control logic on Connection
The _hook_control context manager now operate on connection. We have to keep a
specific entry point in Session to ensure Connection object are properly
cleaned up when using session to "manage" Connection live cycle.
Related to #2503918
sync_schema_props_perms(('State', 'state_of', 'Workflow'), commit=False)
sync_schema_props_perms(('State', 'name', 'String'))