When destroying object with magic, clear the magic first
This stemmed from the discussion during the team call when discussing work done in !2153 (merged). To prevent races, when the object is still used while being destroyed, the MAGIC number needs to be first thing to be cleaned up from the object.
As a side note (we might want to do a separate issue out of it), the magic number should be manipulated by using stdatomic operations to ensure correct ordering (with acquire-release memory ordering).