Use proper wrapper on G_TYPE_FROM_INSTANCE.
Added formal semantics

Though the compiler doesn't implement them.