BUG-1120: introduce generations to ListenerMap
This removes the synchronized block in the fast path, biasing the
implementation heavily towards fast readers.
The readers need only to take a volatile reference (AtomicReference),
at which point they have an isolated read-only view of the map.
Writers on the other hand, though, are fully synchronized and are
required to perform a full copy operation, then do the modifications and
finally reinstate the read-only view through setting the atomic
reference.
Change-Id: I5d118177c1508199b66b9e26499c9fc628d3f65e
Signed-off-by: Robert Varga <rovarga@cisco.com>