[VOL-1697] Update Admin state

This commit consists of the following:
1) Update the Admin State logic to remove any dependencies
2) Update the device state machine to handle the changed admin state
transitions
3) Allow the core to update its internal memory before sending a
reponse to child device detection.

Change-Id: Ifa20ad4d4b36425b672095e2055424bbf05e34bb
diff --git a/rw_core/core/adapter_request_handler.go b/rw_core/core/adapter_request_handler.go
index dbd09e4..caedb79 100644
--- a/rw_core/core/adapter_request_handler.go
+++ b/rw_core/core/adapter_request_handler.go
@@ -546,8 +546,10 @@
 	if rhp.TestMode { // Execute only for test cases
 		return nil, nil
 	}
-	// Run child detection in it's own go routine as it can be a lengthy process
-	go rhp.deviceMgr.childDeviceDetected(pID.Id, portNo.Val, dt.Val, chnlId.Val, vendorId.Val, serialNumber.Val, onuId.Val)
+	if err := rhp.deviceMgr.childDeviceDetected(pID.Id, portNo.Val, dt.Val, chnlId.Val, vendorId.Val, serialNumber.Val, onuId.Val); err != nil {
+		log.Errorw("child-detection-failed", log.Fields{"parentId": pID.Id, "onuId": onuId.Val, "error": err})
+		return nil, err
+	}
 
 	return new(empty.Empty), nil
 }
@@ -922,7 +924,10 @@
 		return nil, nil
 	}
 
-	go rhp.deviceMgr.childDevicesDetected(parentDeviceId.Id)
+	if err := rhp.deviceMgr.childDevicesDetected(parentDeviceId.Id); err != nil {
+		log.Errorw("child-devices-dection-failed", log.Fields{"parentId": parentDeviceId.Id, "error": err})
+		return nil, err
+	}
 
 	return new(empty.Empty), nil
 }