[metadata] Fix crash related to custom attributes (#10739)
* [tests] Renumber duplicate return codes
* [metadata] Fix crash related to custom attributes (#10737)
When a class doesn't contain the desired custom attribute we used
to return the last available attribute. This prevented
`cominterop_ccw_queryinterface()` to detect that the interface
isn't implemented and lead to a crash.
This change fixes #10737.
* [cominterop] Switch to GC Unsafe in IUnknown and IDispatch impls
These methods can be called directly from embedding APIs.