Fixed an invalid read/write caused by deleted temporary
Fixed an invalid read/write caused by deleted temporary

The copy used a std::copy mechanism on optionData, which
resulted in the temporary being deleted before the function
returned.  This creates a variable to hold the temporary so that
the string won't be deleted before use.

Change-Id: I5da2601b730e27d42e244b52ba6cdd69a0e28fb4
Signed-off-by: Erich Keane <ec9f61fe526c14bb62c55d7c978f025ee6b3583d@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1622
Reviewed-by: Mandeep Shetty <9576c34ab780cbbd29c2639a47eb90b07da66bfe@intel.com>
Reviewed-by: Omkar Hegde <2f73167d782cd137889359cdea8329848f05c29a@intel.com>
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>

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