Adding thread safety in notification service.
Issue: Push Event and exit are called at same time.
Then there is a race condition and deadlock occurs.
Solution : Adding mutex which will synchronize tasks between
handler thread and push event thread.
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/669
(cherry-picked from
0b58e0e487a3e2d4e6fe5b02d7fb1dab6b040a6f)
Change-Id: I4db8cd03283cfc1824a32651a63cd6f509621931
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>