Fixed memory handling of HandleSingleResponse
Fixed memory handling of HandleSingleResponse

As identified in the RI code review, the options and token
were leaked and had some interesting behavior if the options count
was zero.  This patch corrects those, and repairs some return
values that were inconsistent and detected while chaising the
memory around.

Change-Id: Ica590fefc8702faa7108cc00642cbc2424f402ac
Signed-off-by: Erich Keane <ec9f61fe526c14bb62c55d7c978f025ee6b3583d@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/564
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Joseph Morrow <74b1946a3796b7d1c8ad79fee44616e505fb0cee@intel.com>

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