libs-battery: make prints cleaner and reuse code

Signed-off-by: Russell Robinson <rrobinson@phytec.com>