Changed the semantics of IpAddress.equals() to (eventually) return true
if both objects are instanceof IpAddress.
I.e., comparing IpAddress and Ip4Address objects could return true
if the underlying value is same.

Applied the same change to IpPrefix.equals() as well.

Change-Id: Ie0644565501d3ecce2a8603117b994d033d5b82f
diff --git a/utils/misc/src/main/java/org/onlab/packet/IpAddress.java b/utils/misc/src/main/java/org/onlab/packet/IpAddress.java
index 2906798..8a8aca2 100644
--- a/utils/misc/src/main/java/org/onlab/packet/IpAddress.java
+++ b/utils/misc/src/main/java/org/onlab/packet/IpAddress.java
@@ -312,7 +312,7 @@
         if (this == obj) {
             return true;
         }
-        if ((obj == null) || (getClass() != obj.getClass())) {
+        if ((obj == null) || (!(obj instanceof IpAddress))) {
             return false;
         }
         IpAddress other = (IpAddress) obj;
diff --git a/utils/misc/src/main/java/org/onlab/packet/IpPrefix.java b/utils/misc/src/main/java/org/onlab/packet/IpPrefix.java
index c2fc175..11cf902 100644
--- a/utils/misc/src/main/java/org/onlab/packet/IpPrefix.java
+++ b/utils/misc/src/main/java/org/onlab/packet/IpPrefix.java
@@ -221,7 +221,7 @@
         if (this == obj) {
             return true;
         }
-        if ((obj == null) || (getClass() != obj.getClass())) {
+        if ((obj == null) || (!(obj instanceof IpPrefix))) {
             return false;
         }
         IpPrefix other = (IpPrefix) obj;