[IOT-1671] Fixed base layer terminate logic
[IOT-1671] Fixed base layer terminate logic

- ObserverList should be removed before destroying ResourceList
to avoid the error of dangling pointer. because ResourceObserver
object includes a resource handle which is memory address allocated
when resource is created.
- Add function to unset network monitoring callback when OCStop()
is called.

Change-Id: I7c0a11c029054163996f00bd760b1445fb6a7899
Signed-off-by: jihwan.seo <69598d7552022c520cfdbefd16641727c7ff4ab5@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15693
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Jaehong Jo <69db334b3f87f30654728856fde276b43c835fe5@samsung.com>
Reviewed-by: Dan Mihai <ba8e1833495515b49ded9e20cae80a8129155aa9@microsoft.com>
Reviewed-by: Hyuna Jo <a3aecee2eabd6f87461b5d05d6fd0eaf35e269ed@samsung.com>
Reviewed-by: Ashok Babu Channa <72ac47ef856ca3d131a57cba474ebed48591eeff@samsung.com>

rzr/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,rzr/iotivity,rzr/iotivity,rzr/iotivity,rzr/iotivity,iotivity/iotivity,iotivity/iotivity,iotivity/iotivity