set $ITERM2_COPROCESS env var inside coprocesses

It might be nice for coprocesses to be able to detect that they are being run in that environment.
This patch sets an environment variable `$ITERM2_COPROCESS`.
The value might as well hold something useful: `ttyname()` from the originating interactive terminal.