wam/wash/saltpig: Add executeContext.requestTTY

* Add a executeContext.requestTTY method so that the thing being executed
  can request changes to the TTY object.
* Make saltpig use this to request that keyboard interupts be disabled
  once the nacl plugin is running.

Change-Id: I845d6835d9de5af0e28984914ada68bc06f4431d
Reviewed-on: https://chromium-review.googlesource.com/199422
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
nassh: Add wash support.

This adds support for the Web Application Shell app from
https://chrome.google.com/webstore/heabhofjglopfacdbaligldaibjogffn
This support enabled by default in "Secure Shell (dev)" but not
"Secure Shell".

You can enable or disable it by changing the 'enable-wam' preference from
the background page.

Open the JS console for the background page from chrome:extensions and type

  app_.prefs_.set('enable-wam', true);

This will cause Secure Shell to listen for "WAM" messages via
chrome.runtime.connect from whitelisted apps and extensions.
The whitelist of allowed extension ids is stored in the 'wam-whitelist'
preference.  By default it includes the id of the "load unpacked..."
version of wash, and the wash (dev) available in the chrome web store.

Change-Id: I5d918e54c373e090df69acbe4f0dc4e64302da6d
Reviewed-on: https://chromium-review.googlesource.com/187712
Reviewed-by: Robert Ginda <rginda@chromium.org>
Commit-Queue: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
hterm 1.36 Add 'ctrl-c-copy' preference.

* Add a 'ctrl-c-copy' preference.  When this is set to false, the default
  setting, Ctrl-C will always send ^C while Ctrl-Shift-C will copy if there is
  an active selection and send ^C if not.

  When 'ctrl-c-copy' set to true the meaning of the shift key is reversed.

  On the open web, the only reliable cross-browser configuration is with
  ctrl-c-copy set to true, as this allows the browser's built-in Ctrl-C handler
  to do its job.  Embedders can call term.getPrefs().changeDefault(
  'ctrl-c-copy', true) to adjust the default preference value in these
  situations.

Change-Id: I9124f63d2f70144a3b3af9313370c072587c7931
Reviewed-on: https://chromium-review.googlesource.com/199567
Reviewed-by: Marvelous Marius <mschilder@chromium.org>
Commit-Queue: Marvelous Marius <mschilder@chromium.org>
Tested-by: Marvelous Marius <mschilder@chromium.org>
Add option for PASS vs. DEFAULT for Meta-V

TESTING=manual
BUG=chromium:373518
Change-Id: Ide4bca07fee47fa5ec0660ec9fa3bb5e0adbfe05
Reviewed-on: https://chromium-review.googlesource.com/199925
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
hterm 1.37: fix selection collapse.

* s/selection.collapse()/selection.collapseToEnd().  The former now throws an
  exception in Chrome if called with no arguments, which breaks our attempts
  to block local selection when vt mouse is enabled.

Change-Id: I1041f211e3b900714bdc743d998141aad7160090
Reviewed-on: https://chromium-review.googlesource.com/200036
Reviewed-by: Marvelous Marius <mschilder@chromium.org>
Commit-Queue: Marvelous Marius <mschilder@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
nassh 0.8.27.5: Add wash support, update hterm.

* Update to hterm 1.38 for 'ctrl-c-copy' and 'pass-meta-v' prefs and selection
  collapse fixes.
* Add wam/wash support.  Enabled by default in Secure shell (dev).  Toggle
  the wam listener from the js console of the secure shell background page with:

    app_.prefs_.set('enable-wam', true);   // enable
    app_.prefs_.set('enable-wam', false);  // disable

    // Array if chrome extension ids which are allowed to make wam connections
    // to nassh.  Defaults to Wash (tot) and Wash (dev).
    app_.prefs_.set('wam-whitelist', [...]);

Change-Id: Ia3813f4b88dd26381242abd87cc4783a4154392e
Reviewed-on: https://chromium-review.googlesource.com/200085
Reviewed-by: Robert Ginda <rginda@chromium.org>
Commit-Queue: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>