Thread-safe determination of TObject::IsOnHeap