This commit fixes some issues in the Core:

1) Fix the loading of the logical device agent in the Core that does
not own the device.
2) Fix an issue when UNI logical ports were ready to be added but
the logical device was not fully ready.
3) Fix an issue with a deadlock condition when multiple flows were
added to the same device
4) Update the logic when receiving requests to process flows from
OFAgent.  The logic will need to be revamped in a subsequent
commit once OFAgent is able to send transactions IDs when issueing
Flow updates.
5) Setup device ownership after a device has been loaded in memory.

Change-Id: I2d604e2ba89e5af21f96871414852c2b6ef85f08
diff --git a/rw_core/core/device_ownership.go b/rw_core/core/device_ownership.go
index ed0fd08..e746444 100644
--- a/rw_core/core/device_ownership.go
+++ b/rw_core/core/device_ownership.go
@@ -190,6 +190,7 @@
 
 	deviceOwned, ownedByMe := da.getOwnership(ownershipKey)
 	if deviceOwned {
+		log.Debugw("ownership", log.Fields{"Id": ownershipKey, "owned": ownedByMe})
 		return ownedByMe
 	}
 	// Not owned by me or maybe nobody else.  Try to reserve it
@@ -283,6 +284,7 @@
 // device Id of a child device or the rootdevice of a logical device.   This function also returns the
 // id in string format of the id param via the ref output as well as if the data was retrieved from cache
 func (da *DeviceOwnership) getOwnershipKey(id interface{}) (ownershipKey string, ref string, cached bool, err error) {
+
 	if id == nil {
 		return "", "", false, status.Error(codes.InvalidArgument, "nil-id")
 	}