Adding ro-core exclusive api calls to the rw-core.

VOL-2257

There were 10 calls implemented in the ro-core that weren't in the rw-core:
GetVoltha
ListCoreInstances
GetCoreInstance
ListDeviceFlowGroups
ListDeviceTypes
GetDeviceType
ListDeviceGroups
GetDeviceGroup
GetImages
GetMeterStatsOfLogicalDevice

Of these, 5 were stubs: (which were copied over anyways)
ListCoreInstances
GetCoreInstance
ListDeviceGroups
GetDeviceGroup
GetMeterStatsOfLogicalDevice

Altered ListDeviceTypes() and GetDeviceType() to pull from AdapterManager.deviceTypeToAdapterMap rather than going directly to the DB.
Also changed gRPC api calls that returned nil, error to return &type{}, error; and unified returns of this form.

Change-Id: Ib86163bdf6809e84d44632792766c4633534da1b
diff --git a/rw_core/core/adapter_manager.go b/rw_core/core/adapter_manager.go
index 37c1259..aa83b53 100644
--- a/rw_core/core/adapter_manager.go
+++ b/rw_core/core/adapter_manager.go
@@ -354,10 +354,26 @@
 	return "", errors.New(fmt.Sprintf("Adapter-not-registered-for-device-type %s", deviceType))
 }
 
+func (aMgr *AdapterManager) listDeviceTypes() []*voltha.DeviceType {
+	aMgr.lockdDeviceTypeToAdapterMap.Lock()
+	defer aMgr.lockdDeviceTypeToAdapterMap.Unlock()
+
+	deviceTypes := make([]*voltha.DeviceType, 0, len(aMgr.deviceTypeToAdapterMap))
+	for deviceTypeId, adapterId := range aMgr.deviceTypeToAdapterMap {
+		if adapterAgent, have := aMgr.adapterAgents[adapterId]; have {
+			if deviceType := adapterAgent.getDeviceType(deviceTypeId); deviceType != nil {
+				deviceTypes = append(deviceTypes, deviceType)
+			}
+		}
+	}
+	return deviceTypes
+}
+
 // getDeviceType returns the device type proto definition given the name of the device type
 func (aMgr *AdapterManager) getDeviceType(deviceType string) *voltha.DeviceType {
 	aMgr.lockdDeviceTypeToAdapterMap.Lock()
 	defer aMgr.lockdDeviceTypeToAdapterMap.Unlock()
+
 	if adapterId, exist := aMgr.deviceTypeToAdapterMap[deviceType]; exist {
 		if adapterAgent, _ := aMgr.adapterAgents[adapterId]; adapterAgent != nil {
 			return adapterAgent.getDeviceType(deviceType)