gi: support boxed type loading

But n_fields and n_methods aren't implemented yet.