Carry previous host subject in HostEvent

This is an enhanced version of gerrit 6085 that provides not only the old location
but also the entire old host subject.
The main purpose is allowing apps to be aware of the change of IP address as well

Change-Id: I448d73b0d1e705996259cb0ec777f959f485d9c2
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
index 8da8101..f35b6c0 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
@@ -291,8 +291,8 @@
     // Produces a host event message to the client.
     protected ObjectNode hostMessage(HostEvent event) {
         Host host = event.subject();
+        Host prevHost = event.prevSubject();
         String hostType = host.annotations().value(AnnotationKeys.TYPE);
-        HostLocation prevLoc = event.prevLocation();
 
         ObjectNode payload = objectNode()
                 .put("id", host.id().toString())
@@ -300,8 +300,8 @@
                 .put("ingress", compactLinkString(edgeLink(host, true)))
                 .put("egress", compactLinkString(edgeLink(host, false)));
         payload.set("cp", hostConnect(host.location()));
-        if (prevLoc != null) {
-            payload.set("prevCp", hostConnect(event.prevLocation()));
+        if (prevHost != null && prevHost.location() != null) {
+            payload.set("prevCp", hostConnect(prevHost.location()));
         }
         payload.set("labels", labels(ip(host.ipAddresses()),
                                      host.mac().toString()));