kernel - More pty fixes
* Allow the pts to be closed and reopened while the ptc is held open
(xterm issues a revoke + open). This fixes xterm.
* Add a flag to differentiate between a slave not yet initially opened
and a slave which has been closed, so ptc reads and the kqfilter
can properly return EOF (tmux).
* Remove pt_flags2 and fold its flags into pt_flags.
* Create a shim to track ttyunhold()'s for session releases and release
the underlying pts (for screen).
Reported-by: josepht (xterm issue)