Fix logic in zigbee wrapper to correctly evaluate boolean values.
Fix logic in zigbee wrapper to correctly evaluate boolean values.

Boolean values could be read as either "0" or "00" and thus a simple
strcmp with "0" would not suffice.
Additionally, sometimes, bitmasks are read and so we need the entire
numeric value of the string.

Changed strcmp operations to convert to numeric operations.
Also extracted duplicate code into it's own function

Change-Id: I9a8918d9824dcb452b64fdbe9f344cfa020f9e7c
Signed-off-by: Mandeep Shetty <9576c34ab780cbbd29c2639a47eb90b07da66bfe@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2957
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Patrick Lankswert <97f91fabd828c4bf3dd3b3638f2b6a4d81d5fd96@intel.com>

santais/iotivity_1.1.0,rzr/iotivity,santais/iotivity_1.1,santais/iotivity_1.1.0,santais/iotivity_1.1,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,santais/iotivity,tienfuc/iotivity-democlient-snap,iotivity/iotivity,santais/iotivity,rzr/iotivity,tienfuc/iotivity-democlient-snap,tienfuc/iotivity-democlient-snap,iotivity/iotivity,santais/iotivity_1.1,tienfuc/iotivity-democlient-snap,iotivity/iotivity,santais/iotivity_1.1.0,iotivity/iotivity,santais/iotivity_1.1,tienfuc/iotivity-democlient-snap,tienfuc/iotivity-democlient-snap,iotivity/iotivity,tienfuc/iotivity-democlient-snap,rzr/iotivity,santais/iotivity_1.1,iotivity/iotivity,santais/iotivity,tienfuc/iotivity-democlient-snap,santais/iotivity,santais/iotivity_1.1.0,santais/iotivity,santais/iotivity_1.1,rzr/iotivity,santais/iotivity_1.1,rzr/iotivity,santais/iotivity_1.1,rzr/iotivity,tienfuc/iotivity-democlient-snap,santais/iotivity_1.1.0,tienfuc/iotivity-democlient-snap,santais/iotivity,santais/iotivity_1.1.0,santais/iotivity_1.1.0,santais/iotivity