Use dockerpty instead for pseudo-tty behaviour (fixes TTY size issue #253 & #97)

This replaces #263, which depended on the use of `os.fork()` to get around the way threads were being used in `socketclient`. Dockerpty uses a more conventional `select()` mechanism and non-blocking pipes.

On attaching to the container, the pseudo-terminal will be sized to match that of the host terminal. On resizing the host terminal, the pseudo-terminal will be resized to match.