-Updating the function warnDeviceSecurityStateChange
-Adding db method for getting the Device based on device_id and also for
merging the object Device after updating the DeviceTrustValue