[ChromeOS-HTerm] Use pseudo-terminal instead of pipes to communicate with crosh process.

Some applications we run in crosh expect their stdin/stdout to be terminal, and
malfunction if we use pipes.
One of results of this change is we stopped distinguishing between stdout and
stderr (both streams are detected through same file descriptor). I still have to
update extension API to reflect this.

Also, added support for detecting when crosh process exits.

This depends on https://chromiumcodereview.appspot.com/9150051/ and
https://chromiumcodereview.appspot.com/9176013/ (and I tested it with those two in place).

TEST=ExtensionTerminalPrivateApiTest.*, ProcessProxy.*, git try
BUG=chromium-os:23273

Review URL: https://chromiumcodereview.appspot.com/9195039

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118975 0039d316-1c4b-4281-b951-d872f2087c98
10 files changed