Resolve TSAN data race in zone_maintenance
requested to merge 2582-threadsanitizer-data-race-lib-dns-zone-c-10272-7-in-zone_maintenance-v9_11 into v9_11
Fix race between zone_maintenance and dns_zone_notifyreceive functions, zone_maintenance was attempting to read a zone flag calling DNS_ZONE_FLAG(zone, flag) while dns_zone_notifyreceive was updating a flag in the same zone calling DNS_ZONE_SETFLAG(zone, ...).
The code reading the flag in zone_maintenance was not protected by the zone's lock, to avoid a race the zone's lock is now being acquired before an attempt to read the zone flag is made.
Closes #2582 (closed)