Fix bugs in host subsystem

- Configured flag is not updated when a learnt host is overridden by a configured host
- NetworkConfigHostProvider should override IP addresses provided by HostLocationProvider
- Adding some unit tests

Change-Id: Id764af6acfeb5fa8f02b5a17aadf686bd6ac97fb
diff --git a/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java b/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java
index 76d14e7..4e4c9fa 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java
@@ -204,14 +204,11 @@
                            }
 
                            final Annotations annotations;
-                           final boolean configured;
                            if (existingHost != null) {
                                annotations = merge((DefaultAnnotations) existingHost.annotations(),
                                        hostDescription.annotations());
-                               configured = existingHost.configured();
                            } else {
                                annotations = hostDescription.annotations();
-                               configured = hostDescription.configured();
                            }
 
                            return new DefaultHost(providerId,
@@ -220,7 +217,7 @@
                                                   hostDescription.vlan(),
                                                   hostDescription.locations(),
                                                   addresses,
-                                                  configured,
+                                                  hostDescription.configured(),
                                                   annotations);
                        });
         return null;