Apply secure log and update the terminate sequence.
[model] Tizen
[binary_type] AP
[customer] Tizen Developer
[issue#] N/A
[problem] Before close the socket, disconnected callback should be deleted first.
[cause] com-core is changed. even though the user close the socket, if there is any registered callback for disconnecting event, it will be invoked.
[solution] Delete disconnection callback first before close the socket.
[team] HomeTF
[request]
[horizontal_expansion]
Change-Id: Iac32ef696ae32812ab40562764a255205842cd6c