Remove potential defects detected in the static analyzer.
1. Applied code conventions.
2. Initialized variable when it was declared.
3. Added mutex unlock operation when consumer service is terminated.
4. Added enum class instead constant values at consumer Test code.
5. Changed enum class to NSSelector from NSAccessPolicy.
Change-Id: Icbcdb6f45bfdf41902d25c4ba5515d7318ea330a
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9751
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>