Add support for character ranges
cleanup character-ranges code

  Also fix documentation lie about all terminals and pseudoterminals
  producing strings.
adjust docstring for :around