thermal: Create check_for_thermal_zones() function

Create a function to check for thermal zones as
an attempt to remove some redundant code.

Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
diff --git a/thermal/thermal_03.sh b/thermal/thermal_03.sh
index 665d851..3259ff4 100755
--- a/thermal/thermal_03.sh
+++ b/thermal/thermal_03.sh
@@ -59,7 +59,8 @@
 
 trap "heater_kill; sigtrap" HUP INT TERM
 
-if [ -z "$thermal_zones"]; then
+check_for_thermal_zones
+if [ $? -ne 0 ]; then
    log_skip "No thermal zones found"
 else
     for_each_thermal_zone check_temperature_change