Fix cppcheck findings

:Release Notes:
Fix potential issues detected by cppcheck.

:Detailed Notes:
Fix cppcheck findings in the DB8 source code and
DB8 tests code.

:Testing Performed:
Tested using local NFS build. Attempted cppcheck run
on the source code.

:QA Notes:

:Issues Addressed:
[BHV-3] [DB8] Investigate and fix potential issues detected
        by cppcheck

Open-webOS-DCO-1.0-Signed-off-by: Iurii Artemenko <iurii.artemenko@lge.com>

Change-Id: I90e405298c73aa404599e193b34e6684b07224c7
Reviewed-on: https://g2g.palm.com/4856
Reviewed-by: DCO Verification
Reviewed-by: Iurii Artemenko <iurii.artemenko@lge.com>
Tested-by: Iurii Artemenko <iurii.artemenko@lge.com>
Reviewed-by: Maksym Sditanov <maxim.sditanov@lge.com>