BUG-1120: fix race window in unregistration

This has the nice benefit of unifying the registration/unregistration
paths, too. This requires a supporting ehnancement in yangtools, which
has been submitted at https://git.opendaylight.org/gerrit/#/c/7568/

Change-Id: Ifd489d6eaf5b7feb4a6efaa09bd468d5818c24cc
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-868: disallow instantiation without executor

This clarifies the deprecated API. As it turns out, instantiation
without an executor should be removed, not the other way around.

Change-Id: I3a2738a4da18ef92d3e8c38d0c12f6df653bd74c
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-1120: introduce NotificationListenerMap

Introduces encapsulation of the set of listeners, such that
modifications and lookup are isolated fromt the rest of the
implementation -- thus clearly defining the entry points.

Also fixes a possible iteration failure if concurrent modification
happens while a interest listener is being added.

Change-Id: I96e0260d372425d261b352b229ae293e638c287c
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-1120: promote synchronization to all entrypoints

This is a temporary regression in performance: get rid of the
synchronized map at the cost of explicit synchronized methods.
Subsequent patches will remove the synchronization from the fast paths.

Change-Id: Ibe90e4e7ff99655a69b77c942ad50baec9df1ba2
Signed-off-by: Robert Varga <rovarga@cisco.com>
BUG-1120: Rename to GenerationalListenerMap

This name better captures the overall intent, so before we make changes
just do a rename, so it's easily reviewable.

Change-Id: I578edc26bcdc5dacbe3575dbb3ed3fe83694a9dd
Signed-off-by: Robert Varga <rovarga@cisco.com>