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_06.sh b/thermal/thermal_06.sh
index 5774977..d57aa0a 100755
--- a/thermal/thermal_06.sh
+++ b/thermal/thermal_06.sh
@@ -109,7 +109,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_trip_point_change