[source/native] refactor eid generation code
This set of related methods clutters the native source API.
It will be better served with a dedicated eid genrator object.
Related to #3526594.
[jcr: allocate the eid generator in __init__]
sync_schema_props_perms(('State', 'state_of', 'Workflow'), commit=False)
sync_schema_props_perms(('State', 'name', 'String'))