[Bug 14078] Rewrite typelib marshaller on top of NDR functions