Fix synchronization problem during application closing
Fix synchronization problem during application closing

[Issue#]        N/A
[Bug]           Application may not close imediately in rare cases.
[Cause]         Synchronization issue.
[Solution]      Fixed synchronization issue.
[Verification]  Build secutiry server, run tests.

Change-Id: I70bf075c38c312731ec5fb360644068e056ae000

pohly/security-manager,Samsung/security-manager,pohly/security-manager,Samsung/security-manager,pohly/security-manager,Samsung/security-manager