Implement registerNotificationListeners()
Bulk listener registration, as introduced a long time ago, should be
supported for all clients. Make sure we have an implementation.
While we are here, also fix thread safety hazards around
registration/unregistration -- with minimal critical sections.
Optimize retained memory by specializing empty/one/multiple registrations,
which in turn allows for some code reuse.
JIRA: NETCONF-1224
Change-Id: I8e40a6c149dbc8bea63d840cbd4cd0a807860175
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>