histogram.h: fix potential div by zero

CID 1188131 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
 divide_by_zero: In expression "lower_sum * 1000000UL / total", division
 by expression "total" which may be zero has undefined behavior

Added check for non zero total.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>