ZMPacket::trylock() stored the result of try_lock() in the shared
`locked` member and returned that member. A failed attempt wrote false
while another thread held the mutex, and the thread that had just
taken the lock could return the other thread's false. ThreadSanitizer
reports the write (zm_packet.cpp:397) against unlock() (:404).
Return the local result and set `locked` only on success. The member is
read in Debug lines without the mutex, so make it std::atomic<bool>.
fixes#5248
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>