Add support for static constructor in compact classes
@sdroege
Submitted by Sebastian Dröge Link to original bug (#564091)
Description
Static constructors for compact classes could be implemented by a GOnce which guards a static initialization function that is called from the instance_init.