Handle SIGWINCH, and tell Readline to resize.

When the terminal emulator window in which gitsh is running is resized,
gitsh will receive a SIGWINCH signal. This commit adds a handler for this
signal, and updates Readline's window size.

The hope is that this will fix a couple of resize-related bugs (strange
wrapping, and pagers loading at the wrong size). These bugs are hard to
reproduce, so it's not 100% clear that this fix works.

Also introduces a TermInfo class to contain `tput` interactions.