lib/locale.t: Improve debug output
This creates a function to display a list of code points that are passed
in. It uses hex for non-ASCII graphics and otherwise outputs the
characters, perhaps as ranges. It makes reading the output a lot
easier. Previously, there could be discrepancies in if the output was
in utf8 vs what the file handle thought, and even when there was no
such discrepancy, the upper Latin1 characters were displayed as if the
locale is Latin1, which it likely wasn't, so the graphics were
misleading.