Display a list of strings as a compact set of columns.

Adapted from the routine of the same name inside cmd.py
