Bug 2181: Switches now properly populate IP addresses

- removed session validity check when reading address
    (session validity should be relevant for consumers and
    not for internal processes)
- added unit test
- replaced deprecated ListenerRegistry class
- fixed imports, rebased

We now mark the switch context as valid 
before
after notifying people.

(cherry picked from commit ad78f6458f16fd7e3b02e9809d95237f48b6d757)
Change-Id: I743b430c0d55e007f0ab18326f149ac46b3d4f66
Signed-off-by: Colin Dixon <colin@colindixon.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>