The second commit is from a suggestion on the original PR by jonatack to remove the unnecessary LOCK(cs_main) in the zmq notifier's NotifyBlock.
This is a partial backport of core#26308
https://github.com/bitcoin/bitcoin/pull/26308/commits/7d253c943f44612431be894b198ffb49ff988fff
Depends on D13052