Change child process termination behavior

Previously, if vncterm got a POLLHUP from the master pty for the child
process, it would close the pty which would cause the child process to
get a SIGHUP and exit.

Newer versions of login close its slave pty fd and reopens it which
causes vncterm to send it a SIGHUP and terminate it.

Fix this by ignoring POLLHUP and only closing the child fd when SIGCHLD
is received.