In tests and log.c, stop using ~0 a log domain mask
There are a few places in the tests where we use ~0 or ~0u to indicate a log domain mask that covers all domains. We also do this in log.c.
But back in #31080 (moved), we made the log_domain_mask_t into a 64-bit value, probably one defined by a macro like LD_ALL_DOMAINS.
Additionally, we should not use ~(uint64_t)0 for the definition of this value, since we don't want to include LD_NO_MOCK, LD_NOCB, and LD_NOFUNCNAME.
Found while looking at #31334 (moved); this should be done after #31334 (moved) is merged.
No backport needed, since we do not yet have any logging domains that use the high 32 bits of this type.