Coverity issues bug fixes

:Release Notes:
Coverity issues bug fixes

:Detailed Notes:
Replaced sscanf() usage by g_strsplit() and atoi() appropriately.
Removed goto statements where usage was inappropriate.
Addressed memory leak issues.

:Testing Performed:
Compiled locally and tested on official build.

:QA Notes:

:Issues Addressed:
[GF-37173] Sleepd: Coverity Issues

Open-webOS-DCO-1.0-Signed-off-by: ashish.sadre <ashish.sadre@lge.com>

Change-Id: Ib3bcaad5cb92ca8015aa186200c96b3c651b8663
Reviewed-on: https://g2g.palm.com/3490
Reviewed-by: Build Verification
Reviewed-by: Premalatha MVS <premalatha.mvs@lge.com>
Reviewed-by: Ashish Sadre <ashish.sadre@lge.com>
Tested-by: Ashish Sadre <ashish.sadre@lge.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>