Extract ttyresize() out of cresize()
Extract ttyresize() out of cresize()

This way we can call cresize() to set the terminal size before creating
a tty or spawning a process, which will start with the correct size.

Signed-off-by: Christoph Lohmann <80554d406dcaab4b48b5b2e6ac7b25e86705c9c0@r-36.net>

google/mt,google/mt