Implement automatic resizing of the terminal.

Since we don't have a pty against which to call the resize ioctls
Vim isn't notified that the window has been resized.
Fix scrollbars appearing while resizing terminal.
Add gigantic hack to resize Vim with the window.

This sends commands to vim by writing APC messages to Vim's stdin
which are then caught by a key mapping installed via a Vim plugin.
Only resize when the window is released.

This significantly reduces the appearance of flicker.
Start Vim at the right size.