[UR] Fix logger use-after-free during shutdown teardown (#23069)
On shutdown, SharedLayer::tearDown() logs while unloading the sanitizer
library, but get_logger()'s singleton sink may already be freed. The
isTearDowned latch that guards this was only set by ~StderrSink, so it
stayed false for stdout/file sinks (used under SYCL_UR_TRACE), and the
log dereferenced the freed sink.
Set the latch from the get_logger() singleton's destructor so it fires
for any sink type.