[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__]
include *.py
include */*.py
recursive-include data *.gif *.png *.ico *.css *.js
recursive-include i18n *.po
recursive-include wdoc *