Added check to not add duplicate resourcetype.
Added check to not add duplicate resourcetype.

Do not add already existing resourcetype and or resource interface to linked list.
Also fixed incorrect logic in insertResourceType().

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

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