[lib][debug] spiff up hexdump() for non multiples of 16

-Only read the words once, and a word at a time.
-Properly handle truncating a non multiple of 16 line at
the next word boundary.

Change-Id: Ifbba0d921d343da903971027fcfff097c2c2207f