Add flags to selectp to enable and disable input to a pane, from Anish
Athalye.
Fix two copy mode problems:

1. In vi mode the selection doesn't include the last character if you
   moved the cursor up or left.
2. In emacs mode the selection includes the last character if you moved
   the cursor to the left.

From Balazs Kezes.
No need to repeat other-end more than once, from Juho Pohjala. Also add
it to the commands list while here.
Don't allow pasting into input-disabled panes, from Anish R Athalye.
Various minor style and spacing nits.
Wake up any clients waiting with the wait-for command when the server
exits.
Fix typo (paneas -> panes).
Add window_last_flag and window_zoomed_flag. From John Morrissey.
Fix some comments (c -> colour) and join unnecessary line splits.
Synchronize forkpty master and child to avoid hang on AIX with fast exiting
child and output left in the queue, from J Raynor.
Solaris doesn't have flock and fcntl is useless so make a no-op flock. Reported
by Dagobert Michelsen.
cdefs.h -> types.h.
I broke last change, fix so it works, from J Raynor.
Don't close random file descriptor on error, from J Raynor.
Merge branch 'obsd-master'