sensorhandler: Don't fail on absent Threshold.Warning interface

Currently if a sensor has only "Threshold.Critical" interface
it would never be parsed as call to the absent "Threshold.Warning"
interface would throw and abort "getSensorThreshold" function.
Refactor "getSensorThreshold" code to fix the issue.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Change-Id: I7b398379272cf62f114c5158980622fb13e22e92
1 file changed