Use g_once for all the mkenums template files
Without this, initialization of enum/flags values from multithreaded programs may not work correctly.
Fixes #1617 (closed).
Without this, initialization of enum/flags values from multithreaded programs may not work correctly.
Fixes #1617 (closed).