Various cleanups in zmqnotificationinterface.
Summary:
This is a pure refactoring of zmqnotificationinterface to make the
code easier to read and maintain. It replaces explicit iterators
with C++11 for-each loops where appropriate and uses std::unique_ptr
to make memory ownership more explicit.
This is a backport of core#13686 [1/5]
https://github.com/bitcoin/bitcoin/pull/13686/commits/e15b1cfc310df739b92bd281112dbeb31d3bb30a
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10282