GH-88: use term charset when setting window title

This is a bit of a hack; I started porting window.c to have a wchar_t
window_title, and getting the terminal to do the conversion before passing
the data through, but this gets messy; quite a bit (including settings and
tray) needs to become wchar_t aware before this can work; it seems almost
acceptable to make the windowing stuff make the decision, based on the
information the terminal has available.