All tests are runnings still, but I need to do more testing in the upcoming days. This implementation uses a different approach for sharing code between the different structures. I tried different abstractions in the last weeks and this is the best one I found so far.
Types can be expected to stay alive until Blender exists. This also works well with the fact that they are identified by their pointer.
Furthermore, the number of types is fairly low, but they are passed around a lot. Maintaining a thread-safe reference count seems to be unnecessary overhead.