Unit test for advanced arena-based memory management features.
This test validates two important aspects of the infix memory model. First, it ensures that the internal arena for a default type registry can dynamically grow to handle a large number of definitions, preventing allocation failures.
Second, it verifies the "shared arena" optimization. When a registry and trampolines are created in a user-provided arena, this test confirms that pointers to named types are shared (rather than deep-copied) to save memory. A control test ensures that the standard API without a shared arena maintains its safe, deep-copying behavior.